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 to the journal entry instance. You’ll also modify the Info.plist
file to allow you to access the camera or photo library.
By the end of this chapter, you’ll have learned how to access the camera or photo library in your...