FREE: Follow my new 100 Days of Swift challenge! >>

< Previous: Connecting up the people   Table of Contents >

Wrap up

UICollectionView and 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 UIImagePickerController, UUID, custom classes and more. You might not realize it yet, but you have enough knowledge now to make a huge range of apps!

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…

Review what you learned

Anyone can sit through a tutorial, but it takes actual work to remember what was taught. It’s my job to make sure you take as much from these tutorials as possible, so I’ve prepared a short review to help you check your learning.

Click here to review what you learned in project 10.

Challenge

One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try your new knowledge to make sure you fully understand what’s going on:

  1. 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.
  2. 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 of UIImagePickerController.isSourceTypeAvailable() before trying to use it!
  3. Modify project 1 so that it uses a collection view controller rather than a table view controller. I recommend you keep a copy of your original table view controller code so you can refer back to it later on.

Share your success!

One of the most effective motivators of success is sharing your progress with other people – when you tell folks what you're doing and what you've learned, it encourages you to come back for more, which in turn will help you reach your app development goals faster.

So, now that you've done all the hard work it's time to share your success: tell folks that you've completed this project, either by clicking the button below to start composing a tweet, or by writing your own message from scratch. This will definitely encourage you to keep learning, but it will also help other folks discover my work – thank you!

 

About the author

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.

< Previous: Connecting up the people   Table of Contents >
MASTER SWIFT NOW
Buy Testing Swift Buy Practical iOS 12 Buy Pro Swift Buy Swift Design Patterns Buy Swift Coding Challenges Buy Server-Side Swift (Vapor Edition) Buy Server-Side Swift (Kitura Edition) Buy Hacking with macOS Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with Swift Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let me know!

Click here to visit the Hacking with Swift store >>