Viz*_*llx 3 iphone xcode objective-c nsthread ios
我经历了很多网站,但仍然没有答案.
我有一个方法,假设void xyz(),它会自动被调用从视图控制器 后每隔3秒.
我不知道该使用什么,我是否必须使用NSThread或PerformSelector.
指导我们.
从ViewDidLoad方法调用此方法.当您的视图将出现在iPhone设备或模拟器中时,ViewDidLoad将会出现.
[NSTimer scheduledTimerWithTimeInterval:3.0f target:self selector:@selector(runMethod) userInfo:nil repeats:YES];
-(void)runMethod
{
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8604 次 |
| 最近记录: |