Barcode scanning utility class, which is used to check permissions and start the barcode scanning screen. It supports barcode scanning in Default View mode.
Declaration
@interface HmsDefaultScanViewController : UIViewController
Initialize delegate methods of DefaultScanView.
HmsDefaultScanViewController *hmsDefaultScanViewController; hmsDefaultScanViewController.defaultScanDelegate = self; HmsDefaultScanViewController *hmsDefaultScanViewController = [[HmsDefaultScanViewController alloc] init];
Delegate method for returning scanning result data.
Declaration
-(void)defaultScanDelegateForDicResult:(NSDictionary *)resultDic
Returns
Type | Description |
|---|---|
NSDictionary | NSDictionary class that contains scanning result data, including:
|
Delegate method for returning image recognition result data.
Declaration
-(void)defaultScanImagePickerDelegateForImage:(UIImage *)image
Sets barcode format options.
Declaration
-(instancetype)initDefaultScanWithFormatType:(HmsScanOptions *)scanOptions
Set the options parameter and initialize ScanViewController.
HmsScanOptions *options = [[HmsScanOptions alloc] initWithScanFormatType:ALL Photo:FALSE]; HmsDefaultScanViewController *hmsDefaultScanViewController = [[HmsDefaultScanViewController alloc] initDefaultScanWithFormatType:options];
Name | Description |
|---|---|
Photo | Specifies whether the camera mode or image mode is used. Value FALSE indicates the camera mode. |
ScanFormatType | ALL is an enumeration-type parameter. You can use bitwise operators to concatenate different barcode formats, for example, QR_CODE | AZTEC. |