我正在非模态设置中使用UIImagePickerController,代码如下:
UIImagePickerController *_imagePickerVC = // init the VC with the main camera as the source
[_mainCameraPreviewContainer addSubview:_imagePickerVC.view];
[_mainCameraPreviewContainer bringSubviewToFront:_imagePickerVC.view];
这个功能可以正常工作,我可以拍照,但是无法轻触预览区域来让相机对焦在该点上。我尝试添加以下一行或两行代码来解决这个问题:
_imagePickerVC.showsCameraControls = NO;
_imagePickerVC.view.userInteractionEnabled = YES;
但是没有运气。当我让它显示相机控件时,我确实会得到闪光模式按钮和选择相机的按钮,但这些按钮也无法点击。在我的情况下,是否有可能使触摸对焦功能正常工作?
mainCameraPreviewContainer.userInteractionEnabled
。谢谢! - TotoroTotoro