Chapter 30. Photo Library and Image Capture
The still photos and movies accessed by the user through the Photos app constitute the photo library. Your app can give the user an interface for exploring this library, similar to the Photos app, through the UIImagePickerController class.
In addition, the Assets Library framework lets you access the photo library and its contents programmatically. You’ll need to link to AssetsLibrary.framework and import <AssetsLibrary/AssetsLibrary.h>
.
The UIImagePickerController class can also be used to give the user an interface similar to the Camera app, letting the user take photos and videos on devices with the necessary hardware.
At a deeper level, AV Foundation (Chapter 28) provides direct control over the camera hardware. You’ll need to link to AVFoundation.framework (and probably CoreMedia.framework as well), and import <AVFoundation/AVFoundation.h>
To use constants such as kUTTypeImage
, referred to in this chapter, your app must link to MobileCoreServices.framework and import <MobileCoreServices/MobileCoreServices.h>
.
Get Programming iOS 6, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.