O'Reilly logo

Xcode 4 Cookbook by Steven F. Daniel

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

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 ...

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