2011-05-18 23 views
2

是否可以爲UINavigationController視圖設置自定義大小? 我需要在視圖中嵌入一個等級列表,我不希望UINavigationController是全屏。UINavigationController大小

其他解決方案?

在此先感謝。

+0

http://stackoverflow.com/questions/2962162/non-fullscreen-uinavigationcontroller的可能重複 – Krishnabhadra 2011-05-18 11:00:32

回答

0

您可以創建一個UINavigationController,然後將其視圖定位爲其他內容的子視圖。例如:

UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:root]; 

UIView * somethingElse = [self getSomethingElse]; 
[somethingElse addSubView:nav.view]; 
[nav setBounds:theBoundsWeWant]; 
[nav setFrame:theFrameWeWant]; 

boundsframe特性將確定在屏幕上示出了NAV。

相關問題