UITableView scrolls to low

Discussion in 'iOS Programming' started by iDeveloper98, Jul 29, 2014.

  1. iDeveloper98 macrumors newbie

    Joined:
    Jul 29, 2014
    #1
    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)
     

    Attached Files:

  2. JohnsonK macrumors regular

    Joined:
    Mar 6, 2014
    #2
    If you don't provide code, there is no way to help
     
  3. iDeveloper98 thread starter macrumors newbie

    Joined:
    Jul 29, 2014
    #3
    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).
     
  4. TheWatchfulOne macrumors 6502

    TheWatchfulOne

    Joined:
    Jun 19, 2009
    #4
    Is that a navigation controller? It looks like you have a navigation controller but without the back button or title filled in.
     
  5. JohnsonK macrumors regular

    Joined:
    Mar 6, 2014
    #5
    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?
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    What do you mean by "scrolls to low"? I'm not sure I understand. Can you describe, in more detail, what you are seeing and what you are expecting to see?
     
  7. TheWatchfulOne macrumors 6502

    TheWatchfulOne

    Joined:
    Jun 19, 2009
    #7
    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.
     
  8. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #8
    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.
     
  9. iDeveloper98 thread starter macrumors newbie

    Joined:
    Jul 29, 2014
    #9
    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.
     
  10. iDeveloper98 thread starter macrumors newbie

    Joined:
    Jul 29, 2014
    #10
    The TableViewController in the bottom right-corner is the one where the problem occurs.
     

    Attached Files:

  11. waterskier2007 macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #11
    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
     
  12. iDeveloper98 thread starter macrumors newbie

    Joined:
    Jul 29, 2014
  13. waterskier2007 macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #13
    If I remember correctly, it is set by default (annoying)
     

Share This Page