1、view
[self performSelectorInBackground:@selector(thread) with :nil];
- (void)thread { for(int i=300;i>=0;i--) { _count = i; // 回调主线程 [self performSelectorOnMainThread:@selector(mainThread) with :nil waitUntilDone:YES]; sleep(1); } } // 此函数主线程执行 - (void)mainThread { self.time.text=[NSString stringWithFormat:@\"%d\",_count]; if (_count==0) { } }
继续阅读与本文标签相同的文章
-
业务系统同城双区部署方案
2026-05-19栏目: 教程
-
RDS_DRDS数据库分配原则
2026-05-19栏目: 教程
-
《21天学通Python(第2版)》| 每日读本书
2026-05-19栏目: 教程
-
ConcurrentHashMap比其他并发集合的安全效率要高一些?
2026-05-19栏目: 教程
-
不写代码也能玩转AI,uber最新开源项目了解一下?
2026-05-19栏目: 教程
