iphone - ios 有计时器吗

标签 iphone ipad

我想创建一个计时器,例如计算 2 秒,并在每秒之后创建一个 nslog 类型,例如 1 秒过去

任何建议这样做

最佳答案

是的,有 NSTimer,将其用作 -

[NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector() userInfo:nil repeats:NO];

关于iphone - ios 有计时器吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5898501/

相关文章:

javascript - 文本区域值更改时双击 iPad 设备

ios - 利用加速度计检测敲击压力强度

objective-c - 在某些 View 中捕获屏幕上任意位置的触摸事件?

iOS - NSInternalInconsistencyException 'circular dependency when saving'

iphone - 如何在 iPhone 应用程序中实现照片效果?

iphone - CGContextShowTextAtPoint 和空白

ios - 以编程方式提取设置包 iOS 中的默认电子邮件帐户

html - Base64 图片到 gmail

iphone - 在用户操作时旋转 UIViewController

iphone - iOS:使用 UIBezierPath 屏蔽 UIImage