This commit is contained in:
Lochlan Wansbrough 2015-05-03 18:32:32 -07:00
parent 547bd2482b
commit bbce1ca770
2 changed files with 16 additions and 3 deletions

View File

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

View File

@ -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)",