1、view
[self performSelectorInBackground:@selector(thread) withObject:nil];
- (void)thread { for(int i=300;i>=0;i--) { _count = i; // 回调主线程 [self performSelectorOnMainThread:@selector(mainThread) withObject:nil waitUntilDone:YES]; sleep(1); } } // 此函数主线程执行 - (void)mainThread { self.time.text=[NSString stringWithFormat:@"%d",_count]; if (_count==0) { } }