NSThread里的RunLoop停止

[NSThreaddetachNewThreadSelector:@selector(display) toTarget:selfwithObject:nil];



- (void)display { self.timer = [NSTimer scheduledTimerWithTimeInterval:0.04 target:self.circularTimer selector:@selector(run) userInfo:nil repeats:YES]; while (_subThreadIsAllow) { [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:5.0f]]; } }

 

posted on 2013-05-03 13:55  leosen  阅读(159)  评论(0编辑  收藏  举报