ORKImageCaptureStep Class Reference

Inherits from ORKStep : NSObject
Declared in ORKImageCaptureStep.h

The ORKImageCaptureStep class represents a step that captures an image through the device camera. A template image can optionally be laid over the camera preview to assist in properly capturing the image.

To use the image capture step, optionally set the templateImage and templateImageInsets properties, incorporate the step into a task, and present the task with a task view controller.

If implementing an image capture task like this one, remember that people will take your instructions literally. So be cautious. Make sure your template image is high contrast and very visible against a variety of backgrounds.

  templateImage

An image to be displayed over the camera preview.

@property (nonatomic, strong) UIImage *templateImage

Discussion

The image is stretched to fit the available space while retaining its aspect ratio. When choosing a size for this asset, be sure to take into account the variations in device form factors.

Declared In

ORKImageCaptureStep.h

  templateImageInsets

Insets to be used in positioning and sizing the templateImage.

@property (nonatomic) UIEdgeInsets templateImageInsets

Discussion

The insets are interpreted as percentages relative to the preview frame size. The left and right insets are relative to the width of the preview frame. The top and bottom insets are relative to the height of the preview frame.

Declared In

ORKImageCaptureStep.h

  accessibilityInstructions

The accessibility hint for the capture preview.

@property (nonatomic, copy) NSString *accessibilityInstructions

Discussion

This property can be used to specify accessible instructions for capturing the image. The use of this property can assist when the templateImage may not be visible to the user.

For example, if you want to capture an image of the user’s right hand, you may use a template image that displays the outline of the right hand. You may also want to set this property to a string such as @“Extend your right hand, palm side down, one foot from your device. Tap the Capture Image button, or two finger tap on the preview, to capture an image of your extended right hand.”

Declared In

ORKImageCaptureStep.h

  accessibilityHint

The accessibility hint for the capture button.

@property (nonatomic, copy) NSString *accessibilityHint

Declared In

ORKImageCaptureStep.h