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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:25:37+00:00 2026-05-27T13:25:37+00:00

I have a problem with UITableView , particularly with scrollToRowAtIndexPath . Here we set

  • 0

I have a problem with UITableView, particularly with scrollToRowAtIndexPath. Here we set a section-header-height and row-height respectively. Later on, when a keyboard is shown, I’ve resize the tableview and scroll to current involved cell using scrollToRowAtIndexPath. The problem is, after trying 3 different type of positioning, only UITableViewScrollPositionTop is positioned correctly while UITableViewScrollPositionMiddle and UITableViewScrollPositionBottom is misplaced. Here’re the screenshots:

UITableViewScrollPositionTopUITableViewScrollPositionMiddle/Bottom

Like the images shown, the top positioning put the row at the top, while middle and bottom positioning is put at around 1 row up of the middle row (for both of them). This only happening in this view (it works fine on other view).

The tableview has fixed margin and flexible width/height (denoted by all marks are bright red in the IB).

I’ve try to check the origin point of the tableview, it stated 0,0. When I move the origin.y a few pixel, the tableview does move down that amount so this wasn’t caused by tableview origin point.

I’ve using this code to get the indexPath before resizing (note that this works fine on other views):

NSIndexPath *indexPath = [tblView indexPathForRowAtPoint:self.frame.origin];
//resize the tableview
[tblView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];

Any idea on why is this position shifting is happening?

Thanks in advance.

  • 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-27T13:25:38+00:00Added an answer on May 27, 2026 at 1:25 pm

    OK. Now I know the cause of this problem and I think I have to share it here since I’m asking here in the first place.

    It’s because the previous developer set the Content Insets Bottom of Scroll View Size of UITableView to 100 in the xib file (the default value should be 0 I think). This picture show where I found this property:
    enter image description here

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

Sidebar

Related Questions

I have one problem with two sections in UITableview grouped style. First section having
I have a problem with data in UITableView. I have UIViewController, that contains UITableView
i have problem with autorotate on iphone i set up in all classes -
I have a strange problem with UITableView and UITextField inside the cell (as subview).
I have a problem when trying to delete rows from my UITableView: The UITableView
I have a grouped UITableView, with cells in section 2 depending on cells in
I have a big problem with an UITableView, I want to use a label
Here is a video of the problem: http://youtu.be/Jid0PO2HgcU I have a problem when trying
I have a problem where my UITableView (group style) has a black tip above
I have a strange problem with my UITableView. I want all the cells 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.