20

Getting Started with the Camera and Photo Library

In the previous chapter, you created the RatingView class and added it to the Add New Journal Entry and Journal Entry Detail screens.

In this chapter, you will complete the implementation of the Add New Journal Entry screen by adding a way for the user to get a photo from the camera or photo library, which they can then add to a new journal entry. You’ll start by adding a tap gesture recognizer to the image view in the New Entry scene, and configure it to display an image picker controller instance. Then you will implement methods from the UIImagePickerControllerDelegate protocol, which allows you to get a photo from the camera or photo library and make the photo smaller before it is saved ...

Get iOS 17 Programming for Beginners - Eighth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.