[bugfix] RCTViewManager view method must always return a new instance
This commit is contained in:
parent
edbbcd75a3
commit
6e5e833da2
|
@ -16,11 +16,7 @@ RCT_EXPORT_MODULE();
|
|||
|
||||
- (UIView *)view
|
||||
{
|
||||
if(!self.camera){
|
||||
self.camera = [[RCTCamera alloc] initWithManager:self bridge:self.bridge];
|
||||
return self.camera;
|
||||
}
|
||||
return self.camera;
|
||||
return [[RCTCamera alloc] initWithManager:self bridge:self.bridge];
|
||||
}
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(aspect, NSInteger);
|
||||
|
@ -284,7 +280,6 @@ RCT_EXPORT_METHOD(stopCapture) {
|
|||
#endif
|
||||
|
||||
dispatch_async(self.sessionQueue, ^{
|
||||
self.camera = nil;
|
||||
[self.previewLayer removeFromSuperlayer];
|
||||
[self.session stopRunning];
|
||||
for(AVCaptureInput *input in self.session.inputs) {
|
||||
|
|
Loading…
Reference in New Issue