react-native-rectangle-doc-scanner 3.11.0 → 3.12.0
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
|
@@ -16,14 +16,21 @@
|
|
|
16
16
|
return self;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
- (void)
|
|
20
|
-
[super
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
- (void)layoutSubviews {
|
|
20
|
+
[super layoutSubviews];
|
|
21
|
+
|
|
22
|
+
// Setup camera after layout is complete and bounds are valid
|
|
23
|
+
if (!_hasSetupCamera && self.window && !CGRectIsEmpty(self.bounds)) {
|
|
24
|
+
NSLog(@"[DocumentScanner] Setting up camera with bounds: %@", NSStringFromCGRect(self.bounds));
|
|
23
25
|
[self setupCameraView];
|
|
24
26
|
[self start];
|
|
25
27
|
_hasSetupCamera = YES;
|
|
26
|
-
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
- (void)didMoveToWindow {
|
|
32
|
+
[super didMoveToWindow];
|
|
33
|
+
if (!self.window && _hasSetupCamera) {
|
|
27
34
|
// Stop camera when view is removed from window
|
|
28
35
|
[self stop];
|
|
29
36
|
}
|