Atalasoft MobileImage API Reference
Instance Methods | Class Methods | Properties | List of all members
kfxKUIBarCodeCaptureControl Class Reference

This class renders the camera preview to the screen and searches for barcodes. More...

#import <kfxKUIBarCodeCaptureControl.h>

Inheritance diagram for kfxKUIBarCodeCaptureControl:

Instance Methods

(int) - readBarcode
 Reads a single barcode from the camera preview. More...
 

Class Methods

(void) + initializeControl
 This message initializes the control and must be sent to the class before it is used. More...
 

Properties

kfxKUIGuidingLine guidingLine
 The current guiding line setting. More...
 
NSArray * symbologies
 The set of symbologies currently being searched for. More...
 
NSArray * searchDirection
 The set of directions currently being seached for barcodes. More...
 
CGSize imagePreviewSize
 Gets the camera preview resolution. More...
 
IBOutlet id< kfxKUIBarCodeCaptureControlDelegatedelegate
 A delegate to receive messages from the control. More...
 
kfxKUIGPSUsageLimits gpsUsageLimits
 gpsUsageLimits - controls whether GPS location information is captured with the image. More...
 

Detailed Description

This class renders the camera preview to the screen and searches for barcodes.

This view provides visual guidance to the end-user to maximize the changes of correctly decoding a barcode. Once the view has been asked to read a barcode, it will search continuously until one is found.

Method Documentation

+ (void) initializeControl

This message initializes the control and must be sent to the class before it is used.

This message initializes the control for use and must be sent to the class before it is used. It is ok to send the message more than once. A common way to do this is in your UIViewController subclasses initialize or init methods.

- (int) readBarcode

Reads a single barcode from the camera preview.

This call returns immediately and starts asynchronously searching for a barcode with the current camera and barcode parameters. The search will continue indefinitely until a barcode is found, allowing time for the device to further stabilize and focus if necessary.

Once a barcode is positively read, the delegate will receive a barcodeCaptureControl:barcodeFound:image message.

Return values
KMC_SUCCESSThe bar code was successfully read. KMC_EV_LICENSING The bar code was not set successfully read, and returned the licensing error code.

Property Documentation

- (IBOutlet id<kfxKUIBarCodeCaptureControlDelegate>) delegate
readwritenonatomicstrong

A delegate to receive messages from the control.

A property to get or set the delegate that will be notified of stability, levelness and found barcodes.

- (kfxKUIGPSUsageLimits) gpsUsageLimits
readwritenonatomicassign

gpsUsageLimits - controls whether GPS location information is captured with the image.

The property allows the app to determine whether the Image Capture Control includes GPS location information with the captured image. The kfxKUIGPSUsageLimits enum has two settings:

kfxKUINeverUse - GPS information will not be gathered under any circumstances. When using kfxKUINeverUse, the user is not queried for permission to collect location information. kfxKUIAlwaysUseIfEnabled - GPS information will be gathered if permitted by the operating system. With kfxKUIAlwaysUseIfEnabled, the user may be queried for permission if no user preference has previously been determined. This is the default setting of this property.

This property should be set in the viewDidLoad method (before the control is displayed).

- (kfxKUIGuidingLine) guidingLine
readwritenonatomicassign

The current guiding line setting.

The guiding line is a visual aid for aligning barcodes within the preview. A guiding line is rendered as a straight line splitting the preview into two equal parts. The intention is for the line to cross through all the bars of a barcode, like the laser of a linear scanner. The guiding line is turned off by default.

Acceptable values are: kfxKUIGuidingLineOff, kfxKUIGuidingLineLandscape, and kfxKUIGuidingLinePortrait.

- (CGSize) imagePreviewSize
readnonatomicassign

Gets the camera preview resolution.

A read-only property to get the resolution of the camera preview. This value will vary depending on the target device and its camera capabilities.

- (NSArray*) searchDirection
readwritenonatomicstrong

The set of directions currently being seached for barcodes.

Searching multiple directions slows down the speed of barcode recognition. If you expect barcodes to only be oriented in certain directions, you should specify only those directions. By default, all directions will be searched, represented by the array [kfxKUIDirectionHorizontal, kfxKUIDirectionVertical].

See also
kfxKUISearchDirection for all supported values.
barcodeControl.searchDirection = @[@(kfxKUIDirectionHorizontal)];
- (NSArray*) symbologies
readwritenonatomicstrong

The set of symbologies currently being searched for.

Searching for multiple symbologies slows down the speed of barcode recognition. You should only specify the symbologies that you are interested in reading. The set of selected symbologies is empty by default.

See also
kfxKUISymbology for all supported values.
barcodeControl.symbologies = @[@(kfxKUISymbologyCode39), @(kfxKUISymbologyPDF417)];

The documentation for this class was generated from the following file:
Untitled Document © 2016 Atalasoft, Inc., 116 Pleasant St, Suite 321, Easthampton, MA 01027, U.S.A. All rights reserved. Use is subject to license terms.