I need to trigger an Alert after 60 seconds… My method, which you can find below, doesn't work… Please help. ViewController.m
-(IBAction)StartGame:(id)sender
{
[self StartGame];
}
-(void) alertus
{
Alert = [[UIAlertView alloc]initWithTitle:@"GAME OVER" message:@"Thank you for Playing!" >delegate:self cancelButtonTitle:@"Dissmiss" otherButtonTitles:nil];
}
-(void)startGame
{
Timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(TimmerCount) >userInfo:nil repeats:YES];
_START.hidden = TRUE;
Timmer2 = [NSTimer scheduledTimerWithTimeInterval:60 target:self selector:@selector(Alertus) >userInfo:nil repeats:NO];
}
-(void)timmerCount{
Countnumber = Countnumber + 1;
TimerDisplay.text = [NSString stringWithFormat:@"%i",Countnumber];
or i tried something like that instead of Timmer2 i wrote
_START.hidden = TRUE;
if (Countnumber>=60) {
[self Alertus];
}
but it didn't work either………… Please Help! Thank you very much :-)
Julian E.