I have a custom View (NotifyView
) added on UIWindow
with a dismiss button(which remove it from UIWindow
).
This view is added when a PU
The problem it is, when you want to give back the focus.
I have implemented as listening each textfield and caching which is the latest. Than resign only that one ( in push ) after that restore state, require focus for that.
You can use the method below
[[[UIApplication sharedApplication] keyWindow] endEditing:YES]
Try this one , for me it works fine
[yourView endEditing:YES]
Try this in delegate method...
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
[self.view endEditing:YES]; // added this in for case when keyboard was already on screen
[self editStartDate:textField];
return NO;
}