Fixes #80
This commit is contained in:
parent
a6f068be1f
commit
8cc61edef2
|
@ -59,6 +59,7 @@ typedef NS_ENUM(NSInteger, RCTCameraTorchMode) {
|
|||
@property (nonatomic) AVCaptureVideoPreviewLayer *previewLayer;
|
||||
@property (nonatomic) NSInteger videoTarget;
|
||||
@property (nonatomic, strong) RCTResponseSenderBlock videoCallback;
|
||||
@property (nonatomic, strong) RCTCamera *camera;
|
||||
|
||||
|
||||
- (void)changeAspect:(NSString *)aspect;
|
||||
|
|
|
@ -16,7 +16,11 @@ RCT_EXPORT_MODULE();
|
|||
|
||||
- (UIView *)view
|
||||
{
|
||||
return [[RCTCamera alloc] initWithManager:self bridge:self.bridge];
|
||||
if(!self.camera){
|
||||
self.camera = [[RCTCamera alloc] initWithManager:self bridge:self.bridge];
|
||||
return self.camera;
|
||||
}
|
||||
return self.camera;
|
||||
}
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(aspect, NSInteger);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"type" : "git",
|
||||
"url" : "https://github.com/lwansbrough/react-native-camera.git"
|
||||
},
|
||||
"version": "0.3.6",
|
||||
"version": "0.3.7",
|
||||
"description": "A Camera component for React Native. Also reads barcodes.",
|
||||
"author": "Lochlan Wansbrough <lochie@live.com> (http://lwansbrough.com)",
|
||||
"nativePackage": true,
|
||||
|
|
Loading…
Reference in New Issue