【发布时间】:2013-12-15 11:36:21
【问题描述】:
我想使用自定义相机叠加视图。下面是它的代码。
imagePicker = [[UIImagePickerController alloc] init];
self.imagePicker.delegate = self;
self.imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
self.imagePicker.showsCameraControls = NO;
self.imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
self.imagePicker.toolbarHidden = YES;
self.imagePicker.wantsFullScreenLayout = YES;
self.imagePicker.navigationBarHidden = YES;
self.imagePicker.cameraOverlayView = [self cameraOverlayView];
问题是底部有黑色背景,我不知道它来自哪里。 代码有什么问题?
【问题讨论】:
-
它在 ios6 和 7 中都能正常工作。您在哪个设备上测试过?
-
@Virussmca 我在 iOS 6 中运行,但它不适合我。
-
在 [self cameraOverlayView] 中有什么东西吗?方法 ?我已经评论了那条线,它在 ios 6 上运行良好。
-
@Virussmca 它返回带有 3 个按钮的自定义覆盖视图。
-
我不知道你怎么了,我已经运行了相同的代码并且它工作正常。
标签: ios objective-c xcode ios6 xcode5