0
我需要在拍照後顯示UIView(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];