For some reason when I run my app on an iPad, tapping UITextFields
in order to fill in data causes the entire app to freeze for a number of seconds. I was browsing Stack, and a similar question answered said it might be because I'm running textFieldShouldEndEditing
on a back thread? But I'm running mine on a main thread:
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
});
return YES;
}
Any idea what could be causing the freeze?