123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- //
- // QQStyleQRScanViewController.h
- //
- // github:https://github.com/MxABC/LBXScan
- // Created by lbxia on 15/10/21.
- // Copyright © 2015年 lbxia. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import <Foundation/Foundation.h>
- #import "LBXScanViewStyle.h"
- //
- //
- //#ifdef LBXScan_Define_ZXing
- //#import "ZXingWrapper.h" //ZXing扫码封装
- //#endif
- //
- //#ifdef LBXScan_Define_ZBar
- //#import "ZBarSDK.h"
- //#import "LBXZBarWrapper.h"//ZBar扫码封装
- //#endif
- @class LBXScanResult;
- @class LBXScanView;
- @class LBXScanNative;
- typedef NS_ENUM(NSInteger, SCANLIBRARYTYPE) {
- SLT_Native,
- SLT_ZXing,
- SLT_ZBar
- };
- // @[@"QRCode",@"BarCode93",@"BarCode128",@"BarCodeITF",@"EAN13"];
- typedef NS_ENUM(NSInteger, SCANCODETYPE) {
- SCT_QRCode, //QR二维码
- SCT_BarCode93,
- SCT_BarCode128,//支付条形码(支付宝、微信支付条形码)
- SCT_BarCodeITF,//燃气回执联 条形码?
- SCT_BarEAN13 //一般用做商品码
- };
- /**
- 扫码结果delegate,也可通过继承本控制器,override方法scanResultWithArray即可
- */
- @protocol LBXScanViewControllerDelegate <NSObject>
- @optional
- - (void)scanResultWithArray:(NSArray<LBXScanResult*>*)array;
- @end
- @interface LBXScanViewController : UIViewController<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
- #pragma mark ---- 需要初始化参数 ------
- //当前选择的扫码库
- @property (nonatomic, assign) SCANLIBRARYTYPE libraryType;
- //
- /**
- 当前选择的识别码制
- - ZXing暂不支持类型选择
- */
- @property (nonatomic, assign) SCANCODETYPE scanCodeType;
- //扫码结果委托,另外一种方案是通过继承本控制器,override方法scanResultWithArray即可
- @property (nonatomic, weak) id<LBXScanViewControllerDelegate> delegate;
- /**
- @brief 是否需要扫码图像
- */
- @property (nonatomic, assign) BOOL isNeedScanImage;
- /**
- @brief 启动区域识别功能,ZBar暂不支持
- */
- @property(nonatomic,assign) BOOL isOpenInterestRect;
- /**
- 相机启动提示,如 相机启动中...
- */
- @property (nonatomic, copy) NSString *cameraInvokeMsg;
- /**
- * 界面效果参数
- */
- @property (nonatomic, strong) LBXScanViewStyle *style;
- #pragma mark ----- 扫码使用的库对象 -------
- /**
- @brief 扫码功能封装对象
- */
- @property (nonatomic,strong) LBXScanNative* scanObj;
- #pragma mark - 扫码界面效果及提示等
- /**
- @brief 扫码区域视图,二维码一般都是框
- */
- @property (nonatomic,strong) LBXScanView* qRScanView;
- /**
- @brief 扫码存储的当前图片
- */
- @property(nonatomic,strong) UIImage* scanImage;
- /**
- @brief 闪关灯开启状态记录
- */
- @property(nonatomic,assign)BOOL isOpenFlash;
- //打开相册
- - (void)openLocalPhoto:(BOOL)allowsEditing;
- //开关闪光灯
- - (void)openOrCloseFlash;
- //启动扫描
- - (void)reStartDevice;
- //关闭扫描
- - (void)stopScan;
- @end
|