Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8646281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:46:02+00:00 2026-06-12T12:46:02+00:00

For my iPad app, I have a view displayed modally as a formsheet when

  • 0

For my iPad app, I have a view displayed modally as a formsheet when a button is pushed. In order to have the keyboard dismissed after entering text in a textfield i tried as suggested;

the “disablesAutomaticKeyboardDismissal” method.

This does not work, in fact, the method is never called acording to the log.
The keybord will dismiss for iPhone or when i choose to not present modally.

Here is my code:

- (BOOL)disablesAutomaticKeyboardDismissal
{  
    NSLog(@"method calls");
    return NO;
}

- (IBAction)showNewView:(id)sender
{

    MyViewController *mvc = 
            [[MyViewController alloc] init];

// some lines about setting content
//...

    UINavigationController *navController = [[UINavigationController alloc] 
                                initWithRootViewController:mvc];

    [navController setModalPresentationStyle:UIModalPresentationFormSheet];
    [self presentViewController:navController animated:YES completion:nil];
}

-(BOOL)disablesAutomaticKeyboardDismissal
or not, the keyboard is not dismissed unless i remove tis line:

    // [navController setModalPresentationStyle:UIModalPresentationFormSheet];

However, then it is not presented the way I want anymore.

Can anyone see what I am doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:46:03+00:00Added an answer on June 12, 2026 at 12:46 pm

    -(BOOL)disablesAutomaticKeyboardDismissal needs to overridden to return NO by the view controller that is presented as a form sheet, not by the presenter; That’s your mistake. In your case you could subclass UINavigationController to get the desired behaviour:

    @interface AutomaticKeyboardDismissingNavigationController : UINavigationController
    @end
    
    @implementation AutomaticKeyboardDismissingNavigationController
    - (BOOL)disablesAutomaticKeyboardDismissal
    {
        return NO;
    }
    @end
    

    (The class name could probably be a bit shorter and still be comprehensible.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic iPhone/iPad app which has a ; a. List view &
I am creating a split view ipad app. I have four buttons in the
I have an iPad app. In the Root View I have a UITableView with
I have a split view controller in my Ipad app, in which the detail
I have created split view based ipad app, where master view is table view
I have a Universal app (iPhone/iPad) which has an iAd displayed at the bottom
I'm writing an iPad app and I have a custom view where I override
In my iPad app I have two textfields. One displays the normal, default textfield
I currently have one iPad app, but it now needs to become two. The
I have an iPhone/iPad app which play a HTTP Live Stream of a tv

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.