Mac Developer Library

Developer

IKCameraDeviceViewDelegate Protocol Reference

Options
Deployment Target:

On This Page

IKCameraDeviceViewDelegate

The IKCameraDeviceViewDelegate protocol is adopted by the delegate of the IKCameraDeviceView class. It allows downloading of camera content, handling selection changes, and handling errors.

  • Invoked for each file that is downloaded from the camera device.

    Declaration

    - (void)cameraDeviceView:(IKCameraDeviceView *)cameraDeviceView didDownloadFile:(ICCameraFile *)file location:(NSURL *)url fileData:(NSData *)data error:(NSError *)error

    Parameters

    cameraDeviceView

    The camera device view that sent the message.

    file

    The camera file.

    url

    The URL to save the data.

    data

    The data.

    error

    Any errors encountered during downloading.

    Discussion

    If the IKCameraDeviceView transferMode property is IKCameraDeviceViewTransferModeFileBased then camera file will have been saved to url. The URL will be a complete path to save the file, including a ‘sequence number’ if the file already exists.

    If the transferMode is IKCameraDeviceViewTransferModeMemoryBased then the data parameter contains the image data and can be handled as appropriate for your application.

    In case of an error, the passed data (both url and data) will be NULL and error (which may come directly from the camera module / or the ImageCaptureCore framework) will describe why the download or save failed.