add preview layer before starting capture
authorsmparkes@smparkes.net <smparkes@smparkes.net@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Thu, 9 Sep 2010 15:10:50 +0000 (15:10 +0000)
committersmparkes@smparkes.net <smparkes@smparkes.net@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Thu, 9 Sep 2010 15:10:50 +0000 (15:10 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1580 59b500cc-1b3d-0410-9834-0bbf25fbcc57

iphone/ScanTest/ScanTest.xcodeproj/project.pbxproj
iphone/ZXingWidget/Classes/ZXingWidgetController.m

index 378ad05..ac821c1 100755 (executable)
                        isa = PBXProject;
                        buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScanTest" */;
                        compatibilityVersion = "Xcode 3.1";
+                       developmentRegion = English;
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                                );
                                IPHONEOS_DEPLOYMENT_TARGET = 4.0;
                                PREBINDING = NO;
-                               SDKROOT = iphoneos4.0;
+                               SDKROOT = iphoneos4.1;
                        };
                        name = Debug;
                };
                                IPHONEOS_DEPLOYMENT_TARGET = 4.0;
                                OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
                                PREBINDING = NO;
-                               SDKROOT = iphoneos4.0;
+                               SDKROOT = iphoneos4.1;
                        };
                        name = Release;
                };
index 4599e3e..8a98c36 100755 (executable)
            object:self.captureSession];
 */
 
-  [self.captureSession startRunning];
-
   if (!self.prevLayer) {
     self.prevLayer = [AVCaptureVideoPreviewLayer layerWithSession:self.captureSession];
   }
   self.prevLayer.frame = self.view.bounds;
   self.prevLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
   [self.view.layer addSublayer: self.prevLayer];
+
+  [self.captureSession startRunning];
 #endif
 }