HVTCameraControllerDelegate Protocol Reference

Conforms to NSObject
Declared in HVTCameraController.h

Overview

The HVTCameraControllerDelegate protocol defines methods that your delegate object must implement to interact with the camera controller interface. The methods of this protocol notify your delegate when the user either finishes capturing an image or movie, or cancels the camera operation.

The delegate methods are responsible for dismissing the picker when the operation completes. To dismiss the picker, call the dismissModalViewControllerAnimated:completion: method of the parent controller responsible for displaying the HVTCameraController object.

To save a still image to the user’s Camera Roll album, call the UIImageWriteToSavedPhotosAlbum function from within the body of the cameraController:didFinishCapturingMediaWithInfo: method. To save a movie to the user’s Camera Roll album, instead call the UISaveVideoAtPathToSavedPhotosAlbum function. These functions, described in UIKit Function Reference, save the image or movie only; they do not save metadata.

To write additional metadata when saving an image to the Camera Roll, use the PHAssetChangeRequest class from the Photos framework. See the description for the HVTCameraControllerMediaMetadata key.

Closing the Camera

– cameraController:didFinishCapturingMediaWithInfo:

Tells the delegate that the user picked a still image or movie.

- (void)cameraController:(HVTCameraController *)cameraController didFinishCapturingMediaWithInfo:(NSDictionary *)info

Parameters

cameraController

The controller object managing the camera interface.

info

A dictionary containing the original image and the edited image, if an image was picked; or a filesystem URL for the movie, if a movie was picked. The dictionary also contains any relevant editing information. The keys for this dictionary are listed in Editing Information Keys.

Discussion

Your delegate object’s implementation of this method should pass the specified media on to any custom code that needs it, and should then dismiss the camera controller view.

Implementation of this method is optional, but expected.

Declared In

HVTCameraController.h

– cameraControllerDidCancel:

Tells the delegate that the user cancelled the pick operation.

- (void)cameraControllerDidCancel:(HVTCameraController *)cameraController

Parameters

cameraController

The controller object managing the camera interface.

Discussion

Your delegate’s implementation of this method should dismiss the camera controller view by calling the dismissModalViewControllerAnimated:completion: method of the parent view controller.

Implementation of this method is optional, but expected.

Declared In

HVTCameraController.h