What is the correct way to cancel the current first interrogator?
I saw the following: Scrolling through fields and calling resignFirstResponder for each.
[[self textFieldForRow:0] resignFirstResponder];
[[self textFieldForRow:1] resignFirstResponder];
[[self textFieldForRow:2] resignFirstResponder];
[[self textFieldForRow:3] resignFirstResponder];
And what is like calling a private function, is this application storage safe ?:
UIWindow *keyWindow = [[UIApplication sharedApplication] keyWindow];
UIView *firstResponder = [keyWindow performSelector:@selector(firstResponder)];
[firstResponder resignFirstResponder];
Is there a better way?
Thank!
Comments: It seems that the second method uses a private api, and because of this, the application-application was rejected: link
source
share