【发布时间】:2011-05-28 16:45:16
【问题描述】:
在我的应用程序中,使用 uiimagepicker 选择图像后,将通过 web 服务对其进行处理。 Web 处理需要一秒钟,所以我想创建一个带有活动指示器视图的灰色叠加层。
我的问题是 UIImagePickerView 视图似乎在处理完成之前一直位于所有内容之上。
我尝试在加载叠加层或开始处理之前使用[myPicker dismissModalViewControllerAnimated:YES];,但视图仍在屏幕上。之后,我的叠加层按如下方式加载
ovController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:[NSBundle mainBundle]];
CGFloat yaxis = self.navigationController.navigationBar.frame.size.height;
CGFloat width = self.view.frame.size.width;
CGFloat height = self.view.frame.size.height;
CGRect frame = CGRectMake(0, yaxis, width, height);
ovController.view.frame = frame;
ovController.view.backgroundColor = [UIColor grayColor];
ovController.view.alpha = 0.7;
[self.view insertSubview:ovController.view aboveSubview:self.view];
在关闭 myPicker 之前,我也尝试过使用 [[myPicker cameraOverlayView] insertSubview:ovController.view];,但无济于事。
为了清楚起见,我正在尝试在 UIImagePicker 消失后,但在 Web 处理开始之前将“加载”覆盖带到屏幕上。
我们将不胜感激。谢谢
【问题讨论】:
标签: iphone ios overlay uiimagepickercontroller subview