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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:30:31+00:00 2026-06-16T16:30:31+00:00

I have a Tableview where the user can enter values into a textField as

  • 0

I have a Tableview where the user can enter values into a textField as one of the custom cells

Apple have some documentation about how to adjust view content by repositioning the view clear of the keyboard’s vertical dimension ( Here ) but it relies upon one placing that view into a UIScrollView. I cant do this with a tableview.

I could redesign the app so that the entry gets done in a separate detail view using the usual navigation controller, but i’d rather the user not have to perform an extra touch ( and be ferried off into yet another screen ) if possible. I like the idea of doing the deed “right where we are”

so my workaround to have a few extra tableview cells at the bottom containing a %20 or so, normal usage shouldn’t register the oddity, as they are only focussed on what is visible.
I’d have to store the spaces in my datasource array and then sort descending, but that’s OK

the question is, is this good practice? and even more possibly, could it be against Apple’s HIG sufficient for refusal?

  • 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-16T16:30:33+00:00Added an answer on June 16, 2026 at 4:30 pm

    You don’t need the extra cells or anything fancy.

    Since your text fields are inside the table view cells, you can use the following:

    - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
    {
        UITableViewCell *cell = (UITableViewCell *)textField.superview.superview;
        NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
        [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
        return YES;
    }
    

    This means that the keyboard will scroll appropriately each time a text field becomes first responder. This takes advantage of the table view being a scroll view subclass.

    Note that this assumes:

    • Your (table) view controller is the text fields’ delegate.
    • Your text field is a subview of the cell’s content view, not the cell itself.
      • If the text field is a subview of the cell, the first line of the method above should reference only one superview (i.e., textField.superview).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tableView and when the user is selecting one of the cells,
I have a tableview that is blank by default. User can add cells to
I have a text field In that user can enter values from 1-10 at
I have 5 cells in my tableview. User can select a row which sets
I have dynamic number of textfields in my tableview, I put each textfield into
I have a tableview where the user can make sections of people using a
I have one user that can't run my iPhone app. It starts up fine
If I have a tableview that has say 3 levels that the user can
I have a tableView, similar to Contacts. The user can add his contacts in
I have a tableView where the user can add contacts to. These contacts get

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.