Create a simple app with a few different categories (dogs, cars, food, planets, etc). When you tap on a category name it should take you into another UITableViewController with a list of possible options. Tapping on an option will show a checkmark at the right of the cell, and remove any other checkmarks on any other cells. When you navigate back to the initial UITableViewController you should see the option that you chose next in the corresponding cell. That is all.
You may pick any categories that you want.
This is a suggestion for how to organize your data.
- Each category is represented by a class, let's call it
CQCategory. This class has 3 properties: name (NSString*), options (NSArray*), selection (NSString*) - In your root
UITableViewController, add apropertythat is anNSArraythat can hold all of yourCQCategoryobjects. - In
prepareForSegue, pass the correspondingCQCategoryobject to the destinationUITableViewController
- Start simple. In your storyboard, drag out a
UINavigationControllerwithUITableViewControlleras the root view controller. Add an additionalUITableViewController. Create a segue when the user taps on a cell in the firstUITableViewController. - Set up your data.
- Populate your first
UITableViewControllerbased on the data that you set up. - Make sure that navigating between
UITableViewControllers is working. You'll need to pass relevant information to the secondUITableViewControllerinprepareForSegue: - Set up the selection interaction in the second
UITableViewController. You'll need to implement on of theUITableViewDelegatemethods. The checkmark iscell.accessoryType, so it's built in. - When selection is made on a cell, update the corrosponding objects
selectionproperty. - Make sure that the cells in the first
UITableViewControllerare displaying theselectionproperty.
:) :) :)
