我有以下的委託方法的UIAlertView中:解聘UIAlertView中編程
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex {
但是我有一個問題。在這種方法中,我會執行一些邏輯並執行一些需要少量時間的代碼。我想在完成所有這些操作之前關閉alertView。我想在該方法的最上方關閉警報視圖。這樣,當用戶點擊alertView上的一個按鈕時,應用程序似乎不會在執行下一行代碼時凍結一秒。
不起作用。你的意思是:'[theAlertView dismissWithClickedButtonIndex:0 animated:YES];' – bearMountain
雅,非常感謝 –