相关疑难解决方法(0)

如何在Objective-C中编写定时器?

我正试图用NSTimer制作秒表.

我给出了以下代码:

 nst_Timer = [NSTimer scheduledTimerWithTimeInterval:0.001 target:self selector:@selector(showTime) userInfo:nil repeats:NO];
Run Code Online (Sandbox Code Playgroud)

并且它在几毫秒内无法工作.它需要超过1毫秒.

iphone timer objective-c nsdate nstimer

37
推荐指数
1
解决办法
4万
查看次数

标签 统计

iphone ×1

nsdate ×1

nstimer ×1

objective-c ×1

timer ×1