Merge pull request #423 from node-vision/master

Fix for issue #386 - camera cras- ios 10 simulator
This commit is contained in:
Zack Story 2016-09-26 07:50:04 +02:00 committed by GitHub
commit 6074ec3c82
1 changed files with 5 additions and 4 deletions

View File

@ -30,10 +30,11 @@ RCT_EXPORT_MODULE();
- (UIView *)view
{
self.session = [AVCaptureSession new];
self.previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:self.session];
self.previewLayer.needsDisplayOnBoundsChange = YES;
#if !(TARGET_IPHONE_SIMULATOR)
self.previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:self.session];
self.previewLayer.needsDisplayOnBoundsChange = YES;
#endif
if(!self.camera){
self.camera = [[RCTCamera alloc] initWithManager:self bridge:self.bridge];
}