NSTimer get executed but does not calls the function
Im having a problem with a NSTimer and i really dont know why this is not working!
i got this
.h
NSTimer eventtimer;
.m
eventtimer = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@select开发者_JS百科or(CheckForAlarm) userInfo:nil repeats:YES];
The problem is that this timer gets executed but never calls that function..
What am i doing wrong??
in .m direct use this without declare in NSTimer
[NSTimer scheduledTimerWithTimeInterval:62 target:self selector:@selector(CheckForAlarm) userInfo:nil repeats:YES];//where required
-(void)CheckForAlarm
{
//your logic
}
精彩评论