UITableView are the most common ways of showing lots of information in iOS, and you now know how to use both. You should be able to go back to project 1 and recognize a lot of very similar code, and that's by intention – Apple has made it easy to learn both view types by learning either one.
You've also learned another batch of iOS development, this time
UUID, custom classes and more. You might not realize it yet, but you have enough knowledge now to make a huge range of apps!
If you wanted to take this app further you could add a second
UIAlertController that is shown when the user taps a picture, and asks them whether they want to rename the person or delete them.
You could also try
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 of
UIImagePickerController.isSourceTypeAvailable() before trying to use it!
Before we finish, you may have spotted one problem with this app: if you quit the app and relaunch, it hasn't remembered the people you added. Worse, the JPEGs are still stored on the disk, so your app takes up more and more room without having anything to show for it!
This is quite intentional, and something we'll return to fix in project 12. Before then, let's take a look at another game…
You finished another project, and I'm glad Hacking with Swift helped you. Now I need your help. Please take just a moment out of your day to tell others about Hacking with Swift so they can benefit too.
You can click below to post a tweet straight to this project. Or if you're feeling particularly generous, you can click here to link to Hacking with Swift on your website and help spread the word.
Thank you. Your support is what keeps me going!
Paul Hudson is the creator of Hacking with Swift, the most comprehensive series of Swift books in the world. He's also the editor of Swift Developer News, the maintainer of the Swift Knowledge Base, and Mario Kart world champion. OK, so that last part isn't true. If you're curious you can learn more here.
Upgrade to the premium experience
Get all 40 projects in PDF and ePub, plus exclusive content that will take your Swift learning to the next level – buy the Hacking with Swift book today!