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

  • Home
  • SEARCH
  • 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 7053955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:34:03+00:00 2026-05-28T03:34:03+00:00

I have a modal set up like this: Despite appearances, the first two fields

  • 0

I have a modal set up like this:

enter image description here

Despite appearances, the first two fields are UITextFields that become first responders and display the keyboard. The third ‘Department’ item is a table view and pushes another view.

I have implemented a scroll view so that while either of the fields is being edited, the user can scroll around and reach the department cell:

enter image description here

When it is selected, before the push, I would like to hide the keyboard. It’s a small detail, but try adding a new event on Apple’s ‘Calendar’ app. It opens with the first text field as first responder (so keyboard is present). If you select the start/end cell, the keyboard hides as the next view is pushed.

How do I achieve this? As a test I tried:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"hiding keyboard");
if ([ingredientName isFirstResponder]) {
    NSLog(@"resigning name field");
    [ingredientName resignFirstResponder];
}
else if ([ingredientAmount isFirstResponder]){
    NSLog(@"resigning amount field");
    [ingredientAmount resignFirstResponder];
}

}

The logging confirms that these are getting called. But the keyboard does not hide. It simply stays in place as the view slides out. And on return, the previous field still has focus (and the keyboard is out).

Any ideas?

  • 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-05-28T03:34:03+00:00Added an answer on May 28, 2026 at 3:34 am

    Two things:
    Are you using a segue for pushing that other VC? If so, resign the keyboard in the prepareForSegue method.

    If not, try using willSelectRowForIndexPath instead of didSelectRowAtIndexPath

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

Sidebar

Related Questions

I have two pages. From the first page, I open a modal with a
I have a model form that contains a DecimalField() with max_digits set to 5.
In my application I have a custom model binder that I set to the
I have set up a Core Data model where I have two objects, say
I have set up a Core Data model that includes an entity, Item with
I have a set of columns that applies to more than 1 model. For
I am trying to set blockUI message to display controller action view. I have
I got a div tag which initially is set to have display:none and will
I have run into this issue several times in the past and would like
More jQuery Tools overlay fun... I have a yes/no jQT modal dialog set up

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.