Ipad hides the keyboard when using UIMODALPRESENTATIONFORMSHEET

hide the keyboard when the IPad uses UIModalPresentationFormSheet

normal practiceresignFirstResponder does not work when UIModalPresentationFormSheet

Add the following code:

[passwordField resignFirstResponder];

@try

{

Class UIKeyboardImpl = NSClassFromString(@”UIKeyboardImpl”);

id activeInstance = [UIKeyboardImplperformSelector:@selector(activeInstance)];

[activeInstanceperformSelector:@selector(dismissKeyboard)];

}

@catch(NSException*exception)

{

NSLog(@”%@”, exception);

}

Hide keyboard when IPad uses UIModalPresentationFormSheet

Common practiceresignFirstResponder does not work when UIModalPresentationFormSheet

Add the following code:
< p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; border:0px; list-style:none; word-wrap:normal; word-break:normal; line-height:normal; font-siz e:11px; font-family:Menlo; color:rgb(59,29,130)"> [passwordField resignFirstResponder ];

@try

< p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; border:0px; list-style:none; word-wrap:normal; word-break:normal; line-height:normal; font-size:11px; font-family:Menlo"> {

Class UIKeyboardImpl = NSClassFromString(@”UIKeyboardImpl”);

id activeInstance = [UIKeyboardImplperformSelector:@selector(activeInstance)];

[activeInstanceperformSelector:@selector(dismissKeyboard)];

}

@ca tch(NSException*exception)

{

NSLog(@”%@”, exception);

}

Add the following code:

[passwordFieldresignFirstResponder];

@try

{

Class UIKeyboardImpl = NSClassFromString(@” UIKeyboardImpl”);

id activeInstance = [UIKeyboardImplperformSelector:@selector< /span>(activeInstance)];

[activeInstanceperformSelector:@selector(dismissKeyboard)];

}

@catch(NSException *exception)< /p>

{

NSLog(@”%@”, exception);

}

Leave a Comment

Your email address will not be published.