Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 1.15 KB

README.md

File metadata and controls

26 lines (17 loc) · 1.15 KB

Project 7 - Whitehouse Petitions

https://www.hackingwithswift.com/100/33

Includes solutions to the challenges.

Bonus:

  • case insentive filtering
  • display current filter in navigation bar
  • filter reset

Topics

UITabBarController, JSON, Data, Codable

Challenges

From Hacking with Swift:

  1. Add a Credits button to the top-right corner using UIBarButtonItem. When this is tapped, show an alert telling users the data comes from the We The People API of the Whitehouse.
  2. Let users filter the petitions they see. This involves creating a second array of filtered items that contains only petitions matching a string the user entered. Use a UIAlertController with a text field to let them enter that string. This is a tough one, so I’ve included some hints below if you get stuck.
  3. Experiment with the HTML – this isn’t a HTML or CSS tutorial, but you can find lots of resources online to give you enough knowledge to tinker with the layout a little.

Screenshots

screenshot1 screenshot2