HmsCustomScanViewController.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. //
  3. // Copyright (c) Huawei Technologies Co., Ltd. 2020-2028. All rights reserved.
  4. //
  5. #import <UIKit/UIKit.h>
  6. #import "HmsScanFormat.h"
  7. @class HmsCustomScanViewController;
  8. @protocol CustomizedScanDelegate <NSObject>
  9. @optional
  10. /*CustomizedScan Delegate
  11. Data returned by code scanning
  12. */
  13. - (void)customizedScanDelegateForResult:(NSDictionary *)resultDic;
  14. @end
  15. @interface HmsCustomScanViewController : UIViewController
  16. @property (nonatomic, weak) id <CustomizedScanDelegate> customizedScanDelegate;
  17. /*
  18. set scan format
  19. */
  20. -(instancetype)initCustomizedScanWithFormatType:(HmsScanOptions *)scanOptions;
  21. /*
  22. hide back button bool, (ture: show; false: hide) defaults to show
  23. */
  24. @property (nonatomic) BOOL backButtonHidden;
  25. /*
  26. Identification area
  27. */
  28. @property (nonatomic) CGRect cutArea;
  29. /*
  30. Bool, (ture:continue scanning; false:end scanning and viewController can be back), defaults to end scanning
  31. */
  32. @property (nonatomic) BOOL continuouslyScan;
  33. /*
  34. pause continuous scan
  35. */
  36. -(void)pauseContinuouslyScan;
  37. /*
  38. resume continuous scan
  39. */
  40. -(void)resumeContinuouslyScan;
  41. /*
  42. back action
  43. */
  44. -(void)backAction;
  45. @end