Chapter 9. Camera, Photos, and Social Networks
In this chapter, you will learn how to incorporate camera functionality into your apps. You will also learn how to access photos and videos from the Photo Library. Finally, you will learn how to integrate your app with popular social networks like Facebook and Twitter. This chapter will teach you the most important pieces of the Swift language, so you can start building apps faster. These pieces were created by Apple to provide a quick and easy way to integrate the camera and connect to social networks.
UIImagePickerController
Apple provides a simple class to take and view photos or video. UIImagePickerController
, shown in Figure 9-1, may look familiar because it is used in many iOS system-wide apps. UIImagePickerController
can be configured to show the front or back camera’s live image right inside your app. It can also be configured to display the Photo Library and allow users to select photos or videos.
UIImagePickerController
is a simple interface that is presented modally above another view controller. A modal view controller is displayed above the current view controller, like a pop-up window. The modal view controller will slide up from the bottom of the screen and must be closed by the user when complete. Modal view controllers should only be used for temporary or short-term interactions.
A UIImagePickerController ...
Get Introducing iOS 8 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.