2013-01-07 44 views
0

我知道這個問題已多次報道(我點擊了幾十個問題/解決方案),但是,我真的沒有得到這個。AFNetworking和越來越wait_fences:未能收到答覆:10004003

我有一個POST請求通過AFJSONRequestOperation。在成功的塊,我做到以下幾點:

 NSString *errorString = [ErrorHandler getErrorMessage:[jsonDictionary valueForKey:@"ERROR"]]; 
     UIAlertView *mainAlert = [[UIAlertView alloc] initWithTitle:@"Error" message:errorString delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 

     [self performSelector:@selector(showAlert:) withObject:mainAlert afterDelay:.5]; // Doesn't work 
     [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(showAlert:) userInfo:mainAlert repeats:NO]; // Doesn't work! 


// Function that gets called 
- (void)showAlert:(NSTimer *)timer 
{ 
    UIAlertView *mainAlert = timer.userInfo; 
    [mainAlert show]; 
} 

我試圖與被貼在SO(performSelector,並與一些我自己的想法沿NSTimer)的多種解決方案。但是,我不斷得到這個臭名昭着的消息。除了初始化一些變量外,我沒有在viewDidLoad方法中做任何事情。還有什麼可以爲此嘗試嗎?我正在爲iOS 5.0編程,並且正在模擬器上完成。

回答

0

我想通了!說實話,不知道這個問題甚至是如何成爲問題的。

我有5 UITextField的,我正在發送數據到服務器。我不得不resignFirstResponder它工作正常。

相關問題