grouped table view

Discussion in 'iOS Programming' started by geiger10d, Feb 22, 2011.

  1. geiger10d macrumors member

    Joined:
    Jan 31, 2011
    #1
    how do i make the first table in a table view a grouped table view? i know i have to look for a initwithstyle and change it to grouped? but there is no initwithstyle in the first view of the table
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    I'm not clear on what you mean. You mean the first section of a table? If so you can't do that: either the entire table (all sections) is grouped or the entire table isn't.
     
  3. geiger10d thread starter macrumors member

    Joined:
    Jan 31, 2011
    #3
    i guess my question is how to change a table view to grouped

    for example if my table looks like

    cell1--(click)-->info
    cell2--(click)--info

    how do i get the table view to be grouped
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    If you're creating the root view controller in IB then there is a setting in IB for the style. If you're creating it in code then there's a setting in the init method.
     
  5. geiger10d thread starter macrumors member

    Joined:
    Jan 31, 2011
    #5
    can you post some code to see what the area its in looks like? because there is no initwithstyle i can find, i can only find that on the second view of the table view
     
  6. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    I wish you'd stop saying things like "second view of the table view" as this makes no sense at all: table views have exactly one view: the table view. If you are pushing a second view controller for the "info" this is a second view controller that stands 100% on it's own: it's not the "second view" of anything.

    As for how to set the style in Interface Builder this image from http://adeem.me/blog/2009/05/20/iphone-sdk-tutorial-part-3-grouped-uitableview/ shows the setting in IB:

    [​IMG]
     

Share This Page