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 3281114
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:46:48+00:00 2026-05-17T19:46:48+00:00

I have a table with 3 UITextFields added to the content views of cells

  • 0

I have a table with 3 UITextFields added to the content views of cells (1 row per section). I have a 4th section that I insert so that I can scroll the particular field to be above the keyboard.

The problem I have (on the iPad only) is that when one of the text fields has firstResponder, it does not relinquish it when user taps on another field. Are there differences in the responder chain on an ipad? In the bellow code for my view controllers UITextFieldDelegate – textFieldShouldEndEditing does not get called when touching another field. Pressing the done button works as expected (unless another field has been touched).

Anything wrong with the code bellow?

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
    if (!_editing++) {
        [self.tableView insertSections:[NSIndexSet indexSetWithIndex:4] withRowAnimation:UITableViewRowAnimationNone];
    }

    // scroll to section number in the text fields tag
    [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:textField.tag] atScrollPosition:UITableViewScrollPositionTop animated:YES];

    return YES;
}

- (void) textFieldDidBeginEditing:(UITextField *)textField {
    self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:textField action:@selector(resignFirstResponder)] autorelease]; 
}

- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
    if (_editing-- == 1) {
        // 
        [self.tableView deleteSections:[NSIndexSet indexSetWithIndex:4] withRowAnimation:UITableViewRowAnimationNone];
    }

    self.navigationItem.rightBarButtonItem = nil;

    // do something with the text here...

    return YES;
}
  • 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-17T19:46:48+00:00Added an answer on May 17, 2026 at 7:46 pm

    OK, i have found a satisfactory workaround, it seems allowing the run loop to execute before the request to animate removing a section fixes the problem. I guess this is an apple bug? For anyone else worried about this issue – i was running iOS3.2.1 on the iPad.

    - (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
        if (_editing == 1) {
            [self performSelector:@selector(hideFinalSection) withObject:nil afterDelay:0.0f];
        }
        else {
            _editing--;
        }
    
        self.navigationItem.rightBarButtonItem = nil;
    
            // do something with the text here...
    
        return YES;
    }
    
    - (void) hideFinalSection {
        if (!(--_editing)) { 
            [self.tableView deleteSections:[NSIndexSet indexSetWithIndex:4] withRowAnimation:UITableViewRowAnimationNone];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grouped table view that contains 3 sections and each row per
I have a table view that has embedded UITextFields for entering some data. It
I have a table view that has many cells. Each cell has its own
I have table with some fields that the value will be 1 0. This
I have table A in Oracle that has a primary key (id). I need
I have a table with a list of employee data. User can select the
im my app that im tring to build, i want to have a table
I have UITextFields on a table to enter values. Some of these fields accept
Possible Duplicate: Table View scroll when text field begin editing iphone I have loaded
I have a table view with two rows, both of which have UITextFields in

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.