我想要發生的情況,按順序:警報框彈出時顯示處理(無按鈕),主要處理功能被調用,當警報框完成時消失,然後我的導航控制器移動到系列中的下一個視圖。當其他視圖正在更改時,UIAlertView不顯示
實際發生的事情:窗口在應用程序處理時凍結,然後警報框在導航控制器切換到下一個視圖時立即顯示並消失。
如何解決這個問題的最佳建議?代碼: [_navigationController dismissModalViewControllerAnimated:NO]; //相機解散 UIAlertView *警報;
alert = [[[UIAlertView alloc] initWithTitle:@"Analyzing\nPlease Wait..." message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles: nil] autorelease];
[alert show];
[self processImage];
[alert dismissWithClickedButtonIndex:0 animated:YES];
[self gotoResults];
使用這一個[self performSelector:@(processImage)] – userar 2011-12-29 06:36:41