1
我目前有一個子視圖覆蓋整個屏幕和一個UIButton。當我按下按鈕時,我提出了一個使用[self presentModalViewController:controller animated:YES];
發送電子郵件的不同視圖,它引發了新視圖(視圖控制器),但在子視圖後面。如果我按下一個按鈕到removeFromSuperview
和子視圖消失,那麼電子郵件視圖控制器是可見的。如何在子視圖上顯示ModalViewController
當使用presentModalViewController
時可以設置Z索引嗎?
我不想在子幻燈片上移之前刪除子視圖。我希望它在用戶輸入他的電子郵件等的整個過程中保持在那裏。因此,當他完成時,子視圖仍然顯示。
顯示子視圖(其具有上的按鈕)
[self.view.superview addSubview:pinSpecsView];
點擊按鈕
UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"Share" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Email", @"Message", nil];
popupQuery.actionSheetStyle = UIActionSheetStyleDefault;
[popupQuery showInView:self.view];
[popupQuery release];
顯示電子郵件控制器 「電子郵件」 之後被選擇
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
....
[self presentModalViewController:controller animated:YES];
哈哈,我現在看到它很明顯 - 在superview之上添加視圖。感謝您指出! – LouwHopley