我已經創建了自己的ProfileUIViewController
類,它是一個UINavigationControllerDelegate
。我顯示在兩種方式這樣的觀點:定製UIModalViewController尺寸並具有導航欄
從IBAction爲內
A-UIViewController.m
,作爲UIModalViewController
。當它加載時,A-UIViewController
有一個UINavigationBar
,但是當我顯示模式時,它不再具有導航欄。從點擊內
B-UIViewController.m
表格單元行,通過將其推入堆棧。B-UIViewController
有當它加載的UINavigationBar
,和ProfileViewController
不斷根據需要:)導航欄
我所希望做的是保持UINavigationBar的視圖時加載的情況下,1模態,裏面填充UINavigationBar而不是覆蓋整個視圖。 (IE,我希望模式出現在導航欄下方的A-UIViewConroller
內 - 使其尺寸更小)
有人可以幫助我嗎?我是否需要製作自己的自定義ModalViewController
類 - 不會是ProfileUIViewController
?它是否需要一些我沒有給它的實例方法?任何方向將是巨大的:)
我想創建一個新的'UINavigationController' INSIDE'A-UIViewController'我的情況?將新的navigationController的根視圖控制器設置爲「A-UIViewController」,然後以模態方式顯示「UINavController」?也許我錯過了一些東西。 – user546459 2011-02-26 21:40:54
你可能有''self presentModalViewController:profileController animated:YES]''。將其更改爲'UINavigationController * nav = [[[UINavigationController alloc] initWithRootViewController:profile] autorelease]; [self presentModalViewController:nav animated:YES];' – Anomie 2011-02-26 21:50:05
Anomie - 謝謝!這至少讓我有一個工作在頂部的navBar。我困惑的原因是我已經調用'[self.navigationController presentModalViewController:profileVC animated:YES]'。我真正喜歡的是顯示UNDERNEATH的模式,顯示在'A-UIViewController'裏面的當前NavBar,而不是創建一個全新的navBar。 – user546459 2011-02-26 21:57:14