AFNetworking and getting wait_fences: failed to receive repl



我知道这个问题已经被报道了很多次了(我点击了几十个问题/解决方案),但是,我真的不明白。

我有一个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 (performSelectorNSTimer以及我自己的一些想法)上发布的多个解决方案。然而,我不断收到那条臭名昭著的信息。我没有在我的viewDidLoad方法中做任何事情,除了初始化一些变量。还有什么可以尝试的吗?我在ios5.0上编程,这是在模拟器上完成的

我明白了!老实说,我不确定这怎么可能是一个问题,一定是框架中的一些东西。

我有5个UITextField,我正在向服务器发送数据。我必须resignFirstResponder,它工作正常

最新更新