You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a problem with keyboard dismissal in a content controller. Resolved but not sure it is the best way:
Scenario: default segue slides to content controller with 3 text fields, tap on any text field, keyboard appears. Tap on done, keyboard disappears, tap on any text field, keyboard appears. Slide to left menu controller, keyboard still appears as editing has not ended in the content controller.
Solution in left menu controller (slide delegate) is to end editing in the content controller on slideMenuWillSlideToSide as follows:
// end editing and ensure keyboard hidden on visible controller
-(void) slideMenuWillSlideToSide:(UINavigationController *)selectedContent{
if ([[[selectedContent visibleViewController] view] respondsToSelector:@selector(endEditing:)]){
[[[selectedContent visibleViewController] view] endEditing:YES];
}
}
Would appreciate advice, Must be missing something, surely managing the keyboard must be easier than this.....
The text was updated successfully, but these errors were encountered:
Have a problem with keyboard dismissal in a content controller. Resolved but not sure it is the best way:
Scenario: default segue slides to content controller with 3 text fields, tap on any text field, keyboard appears. Tap on done, keyboard disappears, tap on any text field, keyboard appears. Slide to left menu controller, keyboard still appears as editing has not ended in the content controller.
Solution in left menu controller (slide delegate) is to end editing in the content controller on slideMenuWillSlideToSide as follows:
// end editing and ensure keyboard hidden on visible controller
-(void) slideMenuWillSlideToSide:(UINavigationController *)selectedContent{
if ([[[selectedContent visibleViewController] view] respondsToSelector:@selector(endEditing:)]){
[[[selectedContent visibleViewController] view] endEditing:YES];
}
}
Would appreciate advice, Must be missing something, surely managing the keyboard must be easier than this.....
The text was updated successfully, but these errors were encountered: