It is used to control the hardware features such as the position of the lens, the exposure, and the flash.ĪVCaptureDeviceInput provides the data coming from the device.ĪVCaptureOutput is an abstract class describing the result of a capture session. These classes give access to the raw data coming from the camera device and can control its components.ĪVCaptureDevice is the interface to the hardware camera. However, when direct access to the camera is necessary, the AVFoundation framework allows full control, for example, for changing the hardware parameters programmatically, or manipulating the live preview.Īn image capture implemented with the AVFoundation framework is based on a few classes. It supports all the basic features, such as switching to the front-facing camera, toggling the flash, tapping on an area to lock focus and exposure, and, on iOS 8, adjusting the exposure just as in the system camera app. UIImagePickerController provides a very simple way to take a picture. In this article, we'll see how image capture with AVFoundation works, how to control the camera, and the new features recently introduced in iOS 8. In the first SDKs, the only way to integrate the camera within an app was by using UIImagePickerController, but iOS 4 introduced the AVFoundation framework, which allowed more flexibility. The iPhone has shipped with a camera since its first model.
0 Comments
Leave a Reply. |