Fixes #24
This commit is contained in:
parent
547bd2482b
commit
bbce1ca770
17
RCTCamera.m
17
RCTCamera.m
|
@ -8,9 +8,22 @@
|
|||
|
||||
@implementation RCTCamera
|
||||
|
||||
- (void)setAspect:(NSString *)aspect
|
||||
- (void)setAspect:(NSInteger)aspect
|
||||
{
|
||||
[self.manager changeAspect:aspect];
|
||||
NSString *aspectString;
|
||||
switch (aspect) {
|
||||
default:
|
||||
case RCTCameraAspectFill:
|
||||
aspectString = AVLayerVideoGravityResizeAspectFill;
|
||||
break;
|
||||
case RCTCameraAspectFit:
|
||||
aspectString = AVLayerVideoGravityResizeAspect;
|
||||
break;
|
||||
case RCTCameraAspectStretch:
|
||||
aspectString = AVLayerVideoGravityResize;
|
||||
break;
|
||||
}
|
||||
[self.manager changeAspect:aspectString];
|
||||
}
|
||||
|
||||
- (void)setType:(NSInteger)type
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"type" : "git",
|
||||
"url" : "https://github.com/lwansbrough/react-native-camera.git"
|
||||
},
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"description": "A Camera component for React Native. Also reads barcodes.",
|
||||
"main": "Camera.ios.js",
|
||||
"author": "Lochlan Wansbrough <lochie@live.com> (http://lwansbrough.com)",
|
||||
|
|
Loading…
Reference in New Issue