开发者

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
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜