如何在不使用NSTimer的情况下每10秒触发一次方法?

arv*_*abi 0 iphone cocoa-touch objective-c ios

我想每隔10秒调用一个方法,但我想使用NSTimer之外的其他方法.我可以用它做什么?

And*_*jão 11

我知道你说你不想使用计时器,但只是为了确保你知道计时器有多简单......

[NSTimer scheduledTimerWithTimeInterval:10.0
                                 target:self
                               selector:@selector(someMethod)
                               userInfo:nil
                                repeats:YES];
Run Code Online (Sandbox Code Playgroud)