2012-12-13 68 views

回答

0

UIViewController除非一個加載視圖後添加不應該產生一個雙導航欄的效果,而不是作爲應用程序的UINavigationController的一部分。不過,你可以使用,

[[self navigationController] pushViewController:yourViewController animated:YES/NO]; 

推一UIViewController如果UIViewController用故事板設計,那麼你可以通過使用下面的代碼調用它。 (記得設置故事板標識符您DDMenuController的東西,因爲它會使用下面的代碼。)

//Add this to the top of your page with the other imports. 
#import "DDMenuController.h" 

//Add this to the selector called by your UIButton. 
DDMenuController *ddMenu = (DDMenuController *)[[self storyboard] instantiateViewControllerWithIdentifier:@"DDMenuVC"]; 
[[self navigationController] pushViewController:ddMenu animated:YES/NO]; 
+0

當我從你的第一線推動DDMenu,其做工精細用單一的導航,但在當時當我打開leftview只是滑動視圖不導航控制器...(我不使用故事板) –

+0

你使用UISplitViewController嗎? – Giz

+0

nop,這是iPhone應用程序,所以沒有UISplitViewController .. –

相關問題