mirror of
https://github.com/zxing/zxing.git
synced 2025-01-13 04:07:27 -08:00
add preview layer before starting capture
git-svn-id: https://zxing.googlecode.com/svn/trunk@1580 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
ce3d27ed69
commit
c19eb95cfc
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue