From: smparkes@smparkes.net Date: Thu, 9 Sep 2010 15:10:50 +0000 (+0000) Subject: add preview layer before starting capture X-Git-Url: http://git.rot13.org/?p=zxing.git;a=commitdiff_plain;h=fc114a5ef53a5164017393450012c4cd5eb4c223 add preview layer before starting capture git-svn-id: http://zxing.googlecode.com/svn/trunk@1580 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- diff --git a/iphone/ScanTest/ScanTest.xcodeproj/project.pbxproj b/iphone/ScanTest/ScanTest.xcodeproj/project.pbxproj index 378ad051..ac821c1c 100755 --- a/iphone/ScanTest/ScanTest.xcodeproj/project.pbxproj +++ b/iphone/ScanTest/ScanTest.xcodeproj/project.pbxproj @@ -197,6 +197,7 @@ isa = PBXProject; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScanTest" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, @@ -323,7 +324,7 @@ ); IPHONEOS_DEPLOYMENT_TARGET = 4.0; PREBINDING = NO; - SDKROOT = iphoneos4.0; + SDKROOT = iphoneos4.1; }; name = Debug; }; @@ -342,7 +343,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 4.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PREBINDING = NO; - SDKROOT = iphoneos4.0; + SDKROOT = iphoneos4.1; }; name = Release; }; diff --git a/iphone/ZXingWidget/Classes/ZXingWidgetController.m b/iphone/ZXingWidget/Classes/ZXingWidgetController.m index 4599e3ed..8a98c361 100755 --- a/iphone/ZXingWidget/Classes/ZXingWidgetController.m +++ b/iphone/ZXingWidget/Classes/ZXingWidgetController.m @@ -344,8 +344,6 @@ object:self.captureSession]; */ - [self.captureSession startRunning]; - if (!self.prevLayer) { self.prevLayer = [AVCaptureVideoPreviewLayer layerWithSession:self.captureSession]; } @@ -353,6 +351,8 @@ self.prevLayer.frame = self.view.bounds; self.prevLayer.videoGravity = AVLayerVideoGravityResizeAspectFill; [self.view.layer addSublayer: self.prevLayer]; + + [self.captureSession startRunning]; #endif }