react-native-rectangle-doc-scanner 3.45.0 → 3.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
#import "RNPdfScannerManager.h"
|
|
3
3
|
#import "DocumentScannerView.h"
|
|
4
|
+
#import <React/RCTUIManager.h>
|
|
4
5
|
|
|
5
6
|
@interface RNPdfScannerManager()
|
|
6
7
|
@property (strong, nonatomic) DocumentScannerView *scannerView;
|
|
@@ -34,15 +35,16 @@ RCT_EXPORT_VIEW_PROPERTY(contrast, float)
|
|
|
34
35
|
|
|
35
36
|
RCT_EXPORT_METHOD(capture:(nonnull NSNumber *)reactTag) {
|
|
36
37
|
NSLog(@"[RNPdfScannerManager] capture called with reactTag: %@", reactTag);
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
39
|
+
UIView *view = [self.bridge.uiManager viewForReactTag:reactTag];
|
|
39
40
|
if (!view || ![view isKindOfClass:[DocumentScannerView class]]) {
|
|
40
41
|
NSLog(@"[RNPdfScannerManager] Cannot find DocumentScannerView with tag #%@", reactTag);
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
[view
|
|
45
|
-
|
|
44
|
+
DocumentScannerView *scannerView = (DocumentScannerView *)view;
|
|
45
|
+
NSLog(@"[RNPdfScannerManager] Calling capture on view: %@", scannerView);
|
|
46
|
+
[scannerView capture];
|
|
47
|
+
});
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
// Deprecated - kept for backward compatibility
|