Location Trivia — Views
Instructions
- Finished versions of the
FISTrivium
andFISLocation
classes are provided from the previous labs. Remember that there are severalFISLocation
s, and eachFISLocation
instance has severalFISTrivium
instances relevant to it. - The goal is to display a table of an
NSArray
ofFISLocation
s. Create a newUITableViewController
namedFISLocationsTableViewController
. * InviewDidLoad
set theaccessibilityLabel
andaccessibilityIdentifier
toLocations Table
* Create anNSArray
property calledlocations
. This will hold all of theFISLocation
objects. - Make each cell a
right detail
cell. This enables two differentUILabel
views that can display different pieces of information. The primary one on the left is thetextLabel
and the secondary label on the right is called thedetailTextLabel
. - For each cell, set the
textLabel
to the name of the location and thedetailTextLabel
to the number of trivia items for that location. - When a cell is tapped, it should take the user to another
UITableViewController
calledFISTriviaTableViewController
. This should display all of the trivia for that location in thetextLabel
of each cell. * InviewDidLoad
set theaccessibilityLabel
andaccessibilityIdentifier
toTrivia Table
Extra Credit
Make multiple sections. Each section should represent a FISLocation
with the section's header being the name property and each cell in it to be the different FISTrivium
objects relevant to that location.
Note: This is hard Allow for the reordering of Locations in your table... helpful link