首页 > 移动平台 > 详细

ios 开启线程定时请求某个方法

时间:2014-08-01 19:42:52      阅读:530      评论:0      收藏:0      [点我收藏+]


- (void)startLoop

{

        [NSThread detachNewThreadSelector:@selector(loopMethod) toTarget:self withObject:nil];

}


- (void)loopMethod

{

    [NSTimer scheduledTimerWithTimeInterval:3.0f target:self selector:@selector(requestIsHaveReview) userInfo:nil repeats:YES];

    NSRunLoop *loop = [NSRunLoop currentRunLoop];

    [loop run];

}

ios 开启线程定时请求某个方法,布布扣,bubuko.com

ios 开启线程定时请求某个方法

原文:http://blog.csdn.net/alincexiaohao/article/details/38340859

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!