Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iDeveloper98

macrumors newbie
Original poster
Jul 29, 2014
5
0
Hello,
I'm working at an App in which I use a UITableViewController.
Its UITableView is scrolled to low automatically (when starting the App). I already tried to take a whole new UITV, but the mistake was still there.
Can anyone help me ? How can I fix this ?
I'm also using other UITVCs in my App which work, so I wondered if this was a bug in the new Xcode version ?

Here are 2 screenshots of this issue:
(In the first image its the normal state: I didn't do anything.)
(In the second image I scrolled up and then did the screenshot to see how it should look.)

Thank you for your help !

(sorry for the format of the second screenshot)
 

Attachments

  • Screen Shot 2014-07-29 at 14.33.13.png
    Screen Shot 2014-07-29 at 14.33.13.png
    41.8 KB · Views: 104
  • Screen Shot 2014-07-29 at 14.33.35.png
    Screen Shot 2014-07-29 at 14.33.35.png
    119.4 KB · Views: 134
As I said, it has nothing to do with my code. I think it's just a bug of Xcode, but the question is how to fix it (maybe by scrolling to the beginning in code, but I don't know how to do this).
 
Is that a navigation controller? It looks like you have a navigation controller but without the back button or title filled in.
 
As I said, it has nothing to do with my code. I think it's just a bug of Xcode, but the question is how to fix it (maybe by scrolling to the beginning in code, but I don't know how to do this).

I have quite a few apps using UITableViews running on iOS 8 and none of them are glitching like yours.

You are the one asking for help, and it looks like you don't know the cause. So how do you know it has nothing to do with your code?
 
Do you have code similiar to this anywhere in your UITableViewController?

Code:
[self.tableView scrollToRowAtIndexPath:indexPath
                       atScrollPosition:UITableViewScrollPositionTop
                               animated:YES];

That is something I found just by doing a little Googling.
 
I think the problem being described is that when the app starts the table view shows as in image 1. After scrolling the tableview it looks like in image 2. The first row, with text 'florian' and the group header, with text 'Rangliste...' aren't visible until the table is manually scrolled. The first row and header are under the navigation controller until being manually scrolled.

Is this correct OP? I would call that scrolls too high but that's not important.

How is the UI created? nib, storyboard, code?
What is the UI hierarchy for this screen? Nav controller? Root UIView? Root UITableViewController? Can you show a screenshot from IB?

I seem to remember this problem happened a lot when iOS 6 (or was it 7?) came out because of some changes aimed at making apps full screen.
 
Is that a navigation controller? It looks like you have a navigation controller but without the back button or title filled in.

Its one tab of a TabBarController, which is additionally managed by a NavigationController (before the TabBarController):

UIVC -> UINavigationController -> TabBarController ->UITVC:

The problem is just like it is described by PhoneyDeveloper.
The hierarchy is created just in the storyboard (see picture).

@TheWatchfulOne: I don't have such code in my program, but I'll try if this works to fix the problem.

I'm sorry I didn't describe the problem precisely, but I'm German, so English is not my first language.
 
The TableViewController in the bottom right-corner is the one where the problem occurs.
 

Attachments

  • Screen Shot 2014-07-30 at 11.59.13.png
    Screen Shot 2014-07-30 at 11.59.13.png
    96.2 KB · Views: 109
There is a property on UIViewController that is automaticallyAdjustsScrollViewInsets

Do you have this set to yes or no? It can be set in Interface Builder
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.