The keyboard does not appear after returning from the ModalViewController

I have a UIViewController, then with this code I present a modal view controller for entering a password.

[self performSegueWithIdentifier:@"SeguePassword" sender:self];

In the Storyboard:

Segue Storyboard Identifier = SeguePassword Style = modal Transition = default Animation = not checked

When I click Cancel on a modal that has the following code:

[self dismissViewControllerAnimated:NO completion:^{}];

Now when I get back, the keyboard is hidden. I have a code showing a toolbar with a hide button. And I see it, but not the keyboard.

Does anyone have any ideas or guidelines that they have taken to solve such a problem? It seems to have started recently after the change conversion for iOS 7.

My decision:

, , , , . I.e.., , iPhone.

:

- (NSUInteger) supportedInterfaceOrientations {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    return UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationLandscapeRight;
} else {
    **return (UIInterfaceOrientationPortrait);**
}

}

:

- (NSUInteger) supportedInterfaceOrientations {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    return UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationLandscapeRight;
} else {
    **return (UIInterfaceOrientationMaskPortrait);**
}

}

, , .

+3
1

, - Responder. UIResponder.

, , , , , . , , , .. Responder, - , . , , , textField textView - , :

   [objectIWantToBeFirstResponder becomeFirstResponder];

, , ? .

segue, , . , modal view controller . , .

segue, , . , :

   ModalViewControllerClass *vc = [[ModalViewControllerClass alloc] init];
   // whatever else you need to do to the vc
    [self presentViewController:vc animated:YESorNO completion:^{
        // This code gets executed when the presented view controller exits
        [objectIWantToBeFirstResponder becomeFirstResponder];
    }];
0

All Articles