$29
School of Electrical Engineering and Computer Science
CptS 479 Mobile Application Development
Homework 5
General Instructions: Put the entire app directory into one zip file and submit as an attachment
under Content Assignments Homework 5 for this course on Blackboard Learn by the above
deadline. Note that you may submit multiple times, but only the most recent entry submitted before
the above deadline will be graded.
This homework builds on HW4 by displaying all the quotations in a table and displaying the
quotation when the table row is tapped. See screen shots below. Specifically,
1. Replace the Main view controller with a table view controller. The table view should be
dynamic and use the Subtitle style for its one prototype cell. Be sure to give the table view
prototype cell an Identifier, e.g., “subtitleCell”. The new Main table view controller should
be embedded in a navigation controller with title “<name>’s Happy Quotes” and prompt
“Health App”, where <name> should be your first name.
2. Create a new UITableViewController class and associate it with the Main table view
controller. The table should be initialized with at least three quotes, where the Title text
should be the quote, and the Detail text should be the author (or “Anonymous” if there is
no author). It’s okay if the quote is truncated with an ellipsis.
3. Implement swipe-left-to-delete in the Main table view controller.
4. Add a bar button item to the right side of the navigation bar and set its System Item to Add
(“+”). Tapping this button should segue to the Add Quotation view, which should behave
just as in HW4. When you unwind back to the Main view, the new quotation (if valid)
should be added to the table.
5. Tapping a row in the Main table should segue to a Detail view that shows the full quote in
a Text View and the author’s name (or “Anonymous” if no author).
6. Test your app using the iPhone 11 simulator, which is the same simulator we will use to
grade your app.
7. Be sure that auto layout constraints are set so that the view elements are appropriately
displayed with no overlap or trimming regardless of device orientation.
2
Storyboard:
3
Simulator:
4