Nstimer+uialert
viewdidload以下に2秒おきにメッセージが出てくるうざい事この上ないコード書いた。動いた。
- (void)viewDidLoad {
[super viewDidLoad];
[NSTimer
scheduledTimerWithTimeInterval:2.0f
target:self
selector:@selector(hoge:)
userInfo:nil
repeats:YES
];
}
-(void)hoge:(NSTimer*)timer{
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"information"
message:@"いんふぉめーしょんだよ"
delegate:self
cancelButtonTitle:@"ok"
otherButtonTitles:nil ];
alert.message=[NSString stringWithFormat:@"%d", 123456];
[alert show];
[alert release ];
}