カスタムビューをロードするView Controllerがあります(UI要素を描画し、スレッドを生成してバックグラウンドでいくつかのことを行います.
「バックグラウンドで実行されるもの」でエラーが発生した場合、ビューコントローラーがそれをキャッチします。この時点で、bgcolor などの UI 要素を変更したり、新しいラベルを追加したりしたいと考えています。
しかし、私が行った変更は表示されません。これは私がしようとしているものです:
[self performSelectorOnMainThread:@selector(onCompleteFail) withObject:nil waitUntilDone:YES];
- (void)onCompleteFail
{
NSLog(@"Error: Device Init Failed");
mLiveViewerView.backgroundColor= [UIColor whiteColor];
//self.view.backgroundColor = [UIColor whiteColor];
UILabel *tmpLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 200, 30)];
tmpLabel.text = @"Failed to init";
[self.view addSubview:tmpLabel];
}