Changes

Jump to: navigation, search

Accessing the iOS 9 Camera and Photo Library

22 bytes added, 19:57, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_IOS9ios9</googlehtmlet>
The iOS 9 SDK provides access to both the camera device and photo library through the UIImagePickerController class. This allows videos and photographs to be taken from within an application and for existing photos and videos to be presented to the user for selection.
This chapter will cover the basics and some of the theory behind the use of the UIImagePickerController class before working through the step by step creation of an example application in [[An Example iOS 9 Camera Application]].
== The UIImagePickerController Class ==
It should be noted that the above code also configured the current class as the delegate for the UIImagePickerController instance. This is actually a key part of how the class works and is covered in the next section.
<googlehtmlet>BUY_IOS9ios9</googlehtmlet>
== Configuring the UIImagePickerController Delegate ==
Once the image or video URL has been obtained the application can optionally save the media to the library and either display the image to the user or play the video using the AVPlayer and AVPlayerViewController classes as outlined in the chapter entitled iOS 9 Video Playback using AVPlayer and AVPlayerViewController.
<googlehtmlet>BUY_IOS9ios9</googlehtmlet>
== Detecting Device Capabilities ==
== Summary ==
In this chapter we have provided an overview of the UIImagePickerController and looked at how this class can be used either to allow a user to take a picture or record video from within an iOS application or select media from the device photo libraries. Now that the theory has been covered, the next chapter entitled [[An Example iOS 9 Camera Application ]] will work through the development of an example application designed to implement the theory covered in this chapter.
<googlehtmlet>BUY_IOS9ios9</googlehtmlet>
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">

Navigation menu