The best control to show 3 account names you can choose?

Discussion in 'iOS Programming' started by MythicFrost, Dec 21, 2009.

  1. MythicFrost macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #1
    I'm trying to make it so you can have three accounts, I'd like to display them in some kind of menu but what is the best control for that?

    Would it be a UITableView? I'd like you to be able to select the one you want and it be highlighted also. I think UITableView is the way to go but maybe there's a better control I am unaware of?
     
  2. PhoneyDeveloper macrumors 68040

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    If you want to display a list of choices and allow the user to pick one then a grouped tableview is a very common way to do this. Look at Settings.app for numerous examples.
     
  3. MythicFrost thread starter macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #3
    Excellent, thank you.

    I've had one little set back with TableViews, I don't know how to add an item to it? do I simply add a UITableViewCell as a Subview?
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    Make sure you've read the entire Table View Programming Guide for iPhone OS before you give up on them.

    EDIT: Another approach you could look into is a UIPickerView.
     
  5. PhoneyDeveloper macrumors 68040

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #5
    Only one little set back? You don't add subviews to a table.

    As Dejo suggests, first read the table view programming guide. If you build the navbar template app it includes code for a simple table. There are also tons of blog entries and other bits of advice on how to work with table views on the web.

    Once you understand table views you will be well on your way to understanding UIKit. Many of the crucial concepts are widely used throughout the framework.
     
  6. MythicFrost thread starter macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #6
  7. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #7
    You'll find, if you haven't noticed already, that there is little patience for questions here that are answered by the documentation and/or various other sources already available to you. For example, check out the average post by robbieduncan in this forum.
     
  8. MythicFrost thread starter macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #8
    Yeah I'm aware of that :p, I'm happy to get pointed in the direction of documentation. Unless it's too complex :p
     

Share This Page