拍照后我需要显示 UIView(UIView 显示加载消息)。
每次我需要显示加载消息时,我都会使用以下代码:
NSArray* loading = [[NSBundle mainBundle] loadNibNamed:@"LoadingViewController"
owner:self
options:nil];
self.loadingView = [ loading objectAtIndex: 0];
[self.view addSubview:self.loadingView];
[self.view bringSubviewToFront:self.loadingView];
self.loadingView is the loading UIView.
按下“完成”按钮(拍照后)后,我需要显示 UIView loadingView,我尝试这样做:
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info
{
NSArray* loading = [[NSBundle mainBundle] loadNibNamed:@"LoadingViewController"
owner:self
options:nil];
self.loadingView = [ loading objectAtIndex: 0];
[picker.navigationBar addSubview:self.loadingView];
[picker.navigationBar bringSubviewToFront:self.loadingView];
/*image processing*/
}
但不工作。我也尝试改变:
[picker.navigationBar addSubview:self.loadingView];
[picker.navigationBar bringSubviewToFront:self.loadingView];
和
[picker.view addSubview:self.loadingView];
[picker.view bringSubviewToFront:self.loadingView];