我試圖運行一個方法,當我的應用程序啓動時涉及到呈現模態視圖。模態視圖出現,因爲我可以看到它覆蓋狀態欄,但它永遠不會超出現有視圖的前端。在應用程序上顯示模態視圖啓動葉子隱藏在另一個視圖後
我在viewDidAppear:(BOOL)動畫方法中試過這個,但這對問題沒有任何影響。
如果我在應用程序加載時通過點擊按鈕調用方法並顯示模式視圖,它應該會顯示在頂部。
我是否錯過了某些東西,或者有沒有辦法強制模態視圖出現在前面?
的代碼我使用目前的看法是這樣的
- (void)viewDidAppear:(BOOL)animated {
ModalView *modalView = [[ModalView alloc] initWithNibName:@"ModalView" bundle:nil];
modalView.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:modalView animated:YES];
[modalView release];
}
然而,這是所謂的zbar和一個SDK調用所以我也發出了疑問給他們,如果什麼奇怪找出正在進行,以防萬一它不是我正在做的事情。
兩天前我有同樣的問題。你可以顯示你的代碼嗎?你需要過渡來展示你的觀點嗎? – 2011-04-30 13:06:08
我的視圖代碼非常多。 - (void)viewDidAppear:(BOOL)animated {modalView * modalView = [[ModalView alloc] initWithNibName:@「ModalView」bundle:nil]; modalView.modalPresentationStyle = UIModalPresentationFullScreen; [self presentModalViewController:modalView animated:YES]; [modalView發佈]; } – 2011-04-30 22:13:58