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 aproperty
that is anNSArray
that can hold all of yourCQCategory
objects. - In
prepareForSegue
, pass the correspondingCQCategory
object to the destinationUITableViewController
- Start simple. In your storyboard, drag out a
UINavigationController
withUITableViewController
as 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
UITableViewController
based on the data that you set up. - Make sure that navigating between
UITableViewController
s is working. You'll need to pass relevant information to the secondUITableViewController
inprepareForSegue:
- Set up the selection interaction in the second
UITableViewController
. You'll need to implement on of theUITableViewDelegate
methods. The checkmark iscell.accessoryType
, so it's built in. - When selection is made on a cell, update the corrosponding objects
selection
property. - Make sure that the cells in the first
UITableViewController
are displaying theselection
property.
:) :) :)