Capturing media with the camera
In this recipe, we will learn how to use the iOS device camera for capturing media.
Following on from our previous recipe, create a new Single View Application, and name it CameraPickerExample.
How to do it...
To begin, follow these simple steps as outlined in the following order:
- Select the
ViewController.xibfiles from the Project Navigator window.
- From the Object Library, select and drag a
UIToolbarobject, and add this to our view and click on the Item button located within our toolbar.
- From the Attributes Inspector section, change the Identifier property to Camera.
- Create an outlet for this
UIBarButtonItem, and name it
- Create the action method for the Camera button and name it