不,我也碰到過這個。問題在於,當您使用基於UIViewController的類呈現模態視圖控制器時,它不會將調用導航控制器的導航欄擴展到模態上。模態視圖覆蓋整個屏幕。我最終做的解決問題的方法是創建一個UINavigationController並將基於UIViewController的類推到它上面,然後將presentModalViewController放到導航控制器的實例中。
喜歡:
UIViewController *vc = [[UIViewController alloc] init];
UINavigationController *cntrol = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentModalViewController:cntrol animated:YES];
[cntrol release];
,讓我有在頂部的導航欄。
我不確定這是否會對您的特定情況有所幫助,我建議的唯一的另一件事是用UIAnimation複製模式的行爲,該UIAnimation停止在手機頂部以下44px。這將保持原始導航欄可見。
哦,我很愚蠢。我不需要頂部的導航控制器,只需一個工具欄,任何工具欄。謝謝 – 2009-06-04 01:05:49
順便說一句,謝謝你在過去5個小時裏把那首歌放在腦海裏。我覺得這是聖誕節。 – 2009-06-04 06:01:39