This sprint challenge is designed to ensure that you are competent with the concepts taught throughout Sprint 2.
Please read this entire README to make sure you understand what is expected of you before you begin. Failure to read and follow the instructions and requirements will be reflected in your results.
In your solution, it is especially important that you follow best practices such as MVC and good, consistent code style. You will be scored on these aspects as well as the project requirements below.
Begin by forking this repository. Clone your fork to your local computer. Use the starter project included in the repository, as it contains images in the assets folder and a file you will use. Commit as appropriate while you work.
- Push your final commit to GitHub by the end of the challenge.
- Create a Pull Request (PR) from your Github fork and tag your Project Manager (PM).
- Submit your Pull Request (PR) link to your Project Manager in your Sprint Retrospective.
You will have 3 hours to complete this sprint challenge
Good luck!
You are not allowed to collaborate during the Sprint Challenge. However, you are encouraged to follow the twenty-minute rule and seek support from your PM and Instructor in your cohort help channel on Slack. Your work reflects your proficiency in iOS and your command of the concepts and techniques in this first unit.
Please view the screen recording so you will know what your finished project should look like:
(The gif is fairly large in size. It may take a few seconds for it to appear)
- A
ShoppingItem
model object with properties:- A name of the item ("Apple").
- A
Bool
indicating whether the item has been added to the shopping list.
- The shopping items should be persisted between launches of the application. On the first launch of the application, use the given shopping
itemNames
to create instances of theShoppingItem
model, and save them to a file.-
Use this snippet of names of images from the asset catalog to create instances of items in the
ShoppingList
model controller:let itemNames = ["Apple", "Grapes", "Milk", "Muffin", "Popcorn", "Soda", "Strawberries"]
-
Use a
Bool
and theUserDefaults
to make sure that new shopping items are initialized only once. -
Save the shopping list to a file using a
PropertyListEncoder
as the user makes changes. -
Test and verify that your app saves and loads changes to the shopping list (quit and relaunch the app).
-
- A custom Collection View Controller that shows a list of shopping items.
- The Collection View Controller should be embedded in a navigation controller.
- A custom Collection View Controller Cell must display all the properties of the shopping item.
- Upon selecting the custom cell, the item's
Bool
value should change fromtrue
tofalse
or vice-versa. - A bar button item on the Collection View Controller that performs a "Show" segue to a detail
UIViewController
subclass. ThisUIViewController
should allow the user to fill in their name, address, and submit the order.- The detail View Controller should display how many items have been added to the "shopping list".
- In the detail view controller, add a button "Submit Order" that creates a
UIAlert
saying the user's order will be delivered in 15 minutes to the user's address.- The alert must include the user's name in the title
- The alert must include the address in the message
- Schedule a local notification instead of the alert saying that the user's order will be delivered to their address in 15 minutes.
- The notification's content must contain the users name and address (schedule it 5-10 seconds into the future for demo purposes).
- Research
UNUserNotificationCenter
andUNMutableNotificationContent
.
- Add functionality to add more shopping items.
- Group the shopping items in sections by whether they have been added to the shopping list.