hamhog

我的技术博客经常被流氓网站恶意爬取转载。请移步原文:http://www.cnblogs.com/hamhog/p/3556805.html,享受整齐的排版、有效的链接、正确的代码缩进、更好的阅读体验。

【初始化】

//参数 timeInterval 为 double 类型,单位为秒;每次到时间时,触发回调函数selector
myTimer = [NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(someFunction) userInfo:nil repeats:YES];
[myTimer setFireDate:[NSDate distantFuture]];

【开始计时】

[myTimer setFireDate:[NSDate date]];

【暂停计时】

[myTimer setFireDate:[NSDate distantFuture]];

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2021-11-30
  • 2021-11-30
  • 2022-12-23
  • 2021-11-30
  • 2021-11-22
  • 2021-11-30
猜你喜欢
  • 2021-11-30
  • 2021-11-30
  • 2021-10-23
  • 2021-11-30
  • 2021-11-30
  • 2021-11-30
相关资源
相似解决方案