我正在尝试在 XCode 中使用 a CameraOverLayView
with a UIImagePickerController
using Storyboards。
在情节提要中,CameraViewController
Segues to ImagePickerController
,其中有一个CameraOverlayView
。
在我的CameraViewController
实现文件中,我有以下代码:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
UIImagePickerController *controller = [segue destinationViewController];
controller.sourceType = UIImagePickerControllerSourceTypeCamera;
controller.delegate = self;
//Here's where I need to assign the CameraOverlayView
//the view defined in my Storyboard
}
以编程方式,我可以创建一个新CameraOverlayView
实例并将其分配给controller.cameraOverlayView
,但是是否可以将情节提要中创建的视图用作ImagePickerController
场景的一部分,如果可以,如何使用?