开发者

Send a message to object in 10 seconds

I want to send message to object in every 10 seconds. I want to do something like this [object message];.How can I do that? Thanks in advance开发者_C百科


You can use an NSTimer. Example.

[NSTimer scheduledTimerWithTimeInterval:10 
                                 target:object 
                               selector:@selector(message)
                               userInfo:nil
                                repeats:YES];

You are recommended to use a selector of the form - (void)timerMethod:(NSTimer *)timer but this works too.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜