【iOS沉思錄】iOS子線程更新UI到主線程的三種方法

簡單說將代碼同步到主線程執行的三種方法以下:java // 1.NSThread [self performSelectorOnMainThread:@selector(updateUI) withObject:nil waitUntilDone:NO]; - (void)updateUI { // UI更新代碼 self.alert.text = @"Thanks!"; }
相關文章
相關標籤/搜索