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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:04:12+00:00 2026-05-30T15:04:12+00:00

Currently I have a UITableView with custom cells and in each cell there is

  • 0

Currently I have a UITableView with custom cells and in each cell there is a UITextField, the problem is that sometimes the UITextField is covered by the UIKeyboard.

So right now I have the Y coordinate for the UIKeyboard and my UITableView is functioning properly with the cells.

So pretty much how can I use that Y coordinate (float), in order to scroll my UITableView to that Y coordinate plus the height of the cell in order to get it right above my UIKeyboard?

Also when I the keyboard hides, how would I reset the UITableView to its normal position that it was in?

Any advice would be appreciated!

Thanks!

CustomCell *cell = (CustomCell*)[[thetextField superview] superview];
    CGRect cellRect = [cell convertRect:cell.frame toView:self.view];
    float bottomCell = cellRect.origin.y - cellRect.size.height;
    if (bottomCell >= keyboardY) {
        NSIndexPath *indexPath = [thetableView indexPathForCell:cell];
        [thetableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated: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-30T15:04:13+00:00Added an answer on May 30, 2026 at 3:04 pm

    One or the other of UITableView‘s

    - (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated;
    - (void)scrollToNearestSelectedRowAtScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated;
    

    I’m guessing that control isn’t getting into the if statement. Consider skipping the y-coordinate check in favor of just scrolling the table view regardless of where it is.

    CustomCell *cell = (CustomCell *)[[theTextField superview] superview];
    NSIndexPath *indexPath = [theTableView indexPathForCell:cell];
    [theTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
    

    OK, if you’re sure it’s getting called, then make sure your indexPath isn’t nil, which may happen if cell isn’t in the tableView or if it’s not a cell.

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

Sidebar

Related Questions

Short Intro Currently I have a UITableView which is filled with custom cells that
I have a UITableView with custom cells. The cells containing one UITextView each and
I have a UITableView that is populated with cells of a variable height. I
I have a UITableView with pagingEnabled. Each cell takes up the viewing area of
I'm having a problem. I have a Custom UITableViewCel, the cell contains a slider
I have a UITableView, and currently it has a single cell in it. I
I'm currently trying to get a UITableView to use custom cell heights based on
In my Universal App I have a long UITableView with custom cells..and for some
In my app, I have a UITableView which has some custom cells and in
Hi i have a working UITableViewController and UITableView with custom cells but i want

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.