簡體   English   中英

presentModalViewController會接管整個iPad屏幕,而不僅僅是右側?

[英]presentModalViewController is taking over whole iPad screen, not just right hand side?

我在iPad上使用APSplitViewController來獲得兩個方面。 在右側工作時,我有一個位於UINavigationController內的viewController。

當我以模態形式呈現EKEventEditViewController (因為它必須是模態的),它不會停留在右側navController的范圍內,而是會接管整個iPad的顯示,並且從那里開始,情況變得越來越糟...

有沒有一種方法可以將模態視圖保持在我在屏幕右側使用的本地UINavigationController的上下文中?

EKEventEditViewController *addController = [[[EKEventEditViewController alloc] initWithNibName:nil bundle:nil] autorelease];
addController.eventStore = self.eventStore;
addController.editViewDelegate = self;
[self presentModalViewController:addController animated:YES];

PS。 實際上,這實際上是任何簡單視圖控制器(不僅是EKEventEditViewController)的問題。 就是在嘗試使用presentModalViewController時。 一個如何使“ presentModalViewController”工作以使其僅占用右側的代碼示例將很棒

除非您編寫自己的自定義presentModalViewController方法,否則不要這樣做。

據我所知,最好用EKEventEditViewController更新APSplitViewController的rightViewController以在右側邊界顯示EKEventEditViewController。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM