O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Fetching Our Assets

We know that we want to find a photo from our library and bring it into our project. Like similar functions in iOS, this is referred to as “fetching.” The class we use to do this is PHFetchResult, which has a suite of class methods to fetch our photos from the photo library.

Adding a Camera Button

First we set up our project to allow our user to access this functionality. We have some room in the top-left corner of our root view controller, so let’s set up our functionality there.

Go to the Object library and choose a new Bar Button item to add to the storyboard. Locate the Tweets scene, the one with the table view, and add the button to the top left. Over in the Attributes Inspector, you will have the option from the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required