在这里使用这个教程: http : //www.musicalgeometry.com/? p=1297我用AVCaptureSession创build了一个自定义覆盖和图像捕获。 我正试图让用户在前后相机之间切换。 这里是我在CaptureSessionManager中的代码来切换摄像头: – (void)addVideoInputFrontCamera:(BOOL)front { NSArray *devices = [AVCaptureDevice devices]; AVCaptureDevice *frontCamera; AVCaptureDevice *backCamera; for (AVCaptureDevice *device in devices) { //NSLog(@"Device name: %@", [device localizedName]); if ([device hasMediaType:AVMediaTypeVideo]) { if ([device position] == AVCaptureDevicePositionBack) { //NSLog(@"Device position : back"); backCamera = device; } else { //NSLog(@"Device position : front"); frontCamera […]