Selecting images and video from the camera roll

In this recipe, we will learn how to give the user the ability to select images and videos from the iOS device's photo album.

Getting ready

Create a new Single View Application, and name it MediaPickerExample.

How to do it...

To begin, follow these simple steps as outlined in the following order:

  1. Select the ViewController.xib files from the Project Navigator window.
  2. From the Object Library, select and drag a UIToolbar object, and add this to our view and select the Item button located within our toolbar.
  3. From the Attributes Inspector section, change the Identifier property to Organize.
  4. Create an outlet for this UIBarButtonItem, and name it btnBrowse.
  5. Create the action method for the Organize button and ...

Get Xcode 4 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.