On my iPhone, when I go into the Settings app, I see "Airplane Mode", "Wi-Fi", "Notifications", etc. and I'm able to scroll through pages and pages of settings.
I'm new to objective-c and开发者_C百科 I'm trying to duplicate the functionality in my own app, but I don't know enough about the objects and techniques to know what to ask or what to look for. :)
With that in mind, can someone please explain what's going on with the settings app? What is this using? Is it a UITableView that allows me to scroll down the page? What control is being used to store the text "Airplane" mode? What is happening when I click on the ">" and see a new page?
Any tips are appreciated.
While nobody outside Apple can be 100% sure how they implement their apps, some reasonable guesses would be:
- The main screen is a grouped UITableView. Each entry is a single cell.
- The text and images in the cells are built using properties of UITableViewCell (e.g. the
textLabel
UILabel for the text "General"). Some of the more advanced items use custom cell views. - Each category view is another UIViewController, pushed onto the
viewControllers
stack of a UINavigationController. - The on/off switches are UISliders.
It is a TableView
- Table View programming Guide
- samplecode
These docs cover all you need
精彩评论