[bugfix] RCTViewManager view method must always return a new instance

This commit is contained in:
Morukutsu 2015-11-03 00:48:03 +01:00
parent edbbcd75a3
commit 6e5e833da2
1 changed files with 1 additions and 6 deletions

View File

@ -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) {