O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

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

Controlling the Camera

There are a couple different ways to capture images within an iOS app. The simplest method involves using a built-in navigation controller that contains all the necessary controls to take a picture and return it to your app.

To expand the MyContactList app to allow for taking a picture, you have to carry out the following steps:

1. Make room in the UI for the image and a button to take/choose an image.

2. Implement code to bring up camera control.

3. Change Core Data design to make room for the picture (and control migration of existing data).

4. Save the image to Core Data.

5. Make sure the image is brought back to UI when view control is loaded.

The first step is to change the UI layout in the Contacts editing screen. ...

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