Follow along at https://www.hackingwithswift.com/100/44.
This day covers the third and final part of Project 10: Names and Faces
in Hacking with Swift.
I have a separate repository where I've been creating projects alongside the material in the book. And you can find Project 10 here. However, I also copied it over to Day 42's folder so I could extend from where I left off.
With that in mind, Day 44 focuses on focuses extending the project according a set of challenges.
Add a second
UIAlertController
that gets shown when the user taps a picture, asking them whether they want to rename the person or delete them.
- 🔗 Commit
Try using
picker.sourceType = .camera
when creating your image picker, which will tell it to create a new image by taking a photo. This is only available on devices (not on the simulator) so you might want to check the return value ofUIImagePickerController.isSourceTypeAvailable()
before trying to use it!
Modify
Project 1
so that it uses a collection view controller rather than a table view controller.
- 🔗 Commit