码迷,mamicode.com
首页 > 其他好文 > 详细

定时器

时间:2015-10-21 22:25:15      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:

    //TimeInterval  时间间隔

    //target        目标

    //selector      target 要执行 selector 方法

    //userInfo      用户信息

    //repeats       是否反复定时执行

NSTimer *timer  = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(changeColor) userInfo:nil repeats:YES];

//停止定时器

[_timer setFireDate:[NSDate distantFuture]];

定时器

标签:

原文地址:http://www.cnblogs.com/tapple/p/4899067.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!