Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/104.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UIAlertView上方的UIImagePickerController_Ios_Camera_Uiimagepickercontroller_Uialertview - Fatal编程技术网

Ios UIAlertView上方的UIImagePickerController

Ios UIAlertView上方的UIImagePickerController,ios,camera,uiimagepickercontroller,uialertview,Ios,Camera,Uiimagepickercontroller,Uialertview,我正在开发一个应用程序,我需要UIAlertView出现在背景中,而UIImagePickerController正在显示相机。当前,当显示摄像机控制器时,UIAlertView显示为超级视图(摄像机上方) 非常感谢您的想法。您可以显示alertView,然后演示ImagepickerController。因此,当您丢失imagePickerController时,您将在viewController上显示alertView 警报视图添加到窗口而不是控制器。他们将永远处于领先地位。您可以在aler

我正在开发一个应用程序,我需要
UIAlertView
出现在背景中,而
UIImagePickerController
正在显示相机。当前,当显示摄像机控制器时,
UIAlertView
显示为超级视图(摄像机上方)


非常感谢您的想法。

您可以显示
alertView
,然后演示
ImagepickerController
。因此,当您丢失
imagePickerController
时,您将在viewController上显示alertView

警报视图添加到窗口而不是控制器。他们将永远处于领先地位。您可以在alertview中显示选择器以重叠它。 你可以使用这个图书馆


分享你的代码。你在做什么?@Lion我正在显示一个自定义的AlertView,上面有一个UI开关。如果用户打开开关,相机应该打开,用户可以拍照。拍摄完照片后,应关闭相机控制器,用户应单击其上的“完成”按钮自行关闭警报。问题是。当显示摄像头时,UIAlertView仍位于顶部。您如何显示摄像头和alertview?这就是为什么我要代码。分享你的代码,这样我就可以帮你了。但是,如果添加到UIAlertview上,是否可以全屏显示?全屏警报视图是可能的。那让我试试。太好了。。它起作用了。。得到一个例外。无法形成对类PLUICameraViewController的实例(0x16e67b10)的弱引用。探索更多。。有了主意。清除了异常,但将@Property设置为CustomAlertView&ImagePicker。工作起来很有魅力。
UIImagePickerController *cameraView = [[UIImagePickerController     alloc] init];

cameraView.sourceType = UIImagePickerControllerSourceTypeCamera;

cameraView.showsCameraControls = NO;
CustomIOSAlertView *alertView = [[CustomIOSAlertView alloc] init];
    UIView *container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, screen.size.width, screen.size.height)];
    [container addSubview:cameraView.view];
    container.subviews.lastObject.center =  CGPointMake(container.subviews.lastObject.center.x, container.center.y);
    [alertView setContainerView:container];
    [alertView setDelegate:self];
    //    Display the dialog
[cameraView viewWillAppear:YES]; // trickery to make it show
[cameraView viewDidAppear:YES];
    [alertView show];