1 | // Copyright 2016-present 650 Industries. All rights reserved.
|
2 |
|
3 | #import <EXBarCodeScanner/EXBarCodeScannerViewManager.h>
|
4 | #import <EXBarCodeScanner/EXBarCodeScannerView.h>
|
5 |
|
6 | @interface EXBarCodeScannerViewManager ()
|
7 |
|
8 | @property (nonatomic, weak) UMModuleRegistry *moduleRegistry;
|
9 |
|
10 | @end
|
11 |
|
12 | @implementation EXBarCodeScannerViewManager
|
13 |
|
14 | UM_REGISTER_MODULE();
|
15 |
|
16 | + (const NSString *)exportedModuleName
|
17 | {
|
18 | return @"ExpoBarCodeScannerView";
|
19 | }
|
20 |
|
21 | - (NSString *)viewName
|
22 | {
|
23 | return @"ExpoBarCodeScannerView";
|
24 | }
|
25 |
|
26 | - (void)setModuleRegistry:(UMModuleRegistry *)moduleRegistry
|
27 | {
|
28 | _moduleRegistry = moduleRegistry;
|
29 | }
|
30 |
|
31 | - (UIView *)view
|
32 | {
|
33 | return [[EXBarCodeScannerView alloc] initWithModuleRegistry:_moduleRegistry];
|
34 | }
|
35 |
|
36 | - (NSArray<NSString *> *)supportedEvents
|
37 | {
|
38 | return @[
|
39 | @"onBarCodeScanned",
|
40 | ];
|
41 | }
|
42 |
|
43 | UM_VIEW_PROPERTY(type, NSNumber *, EXBarCodeScannerView)
|
44 | {
|
45 | [view setPresetCamera:[value integerValue]];
|
46 | }
|
47 |
|
48 | UM_VIEW_PROPERTY(barCodeTypes, NSArray *, EXBarCodeScannerView)
|
49 | {
|
50 | [view setBarCodeTypes:value];
|
51 | }
|
52 |
|
53 | @end
|