2013-03-29 26 views

回答

2
YourViewController *report = [[YourViewController alloc] init]; // create Object of YourViewController 

UINavigationController *navigationController = [[UINavigationController alloc]initWithRootViewController:report]; // add YourViewController as root view controller of UINavigationController 

[self presentModalViewController:navigationController animated:YES]; 
+0

如果他們不在appDelegate中添加NavigationController如何推它..? –

+0

你好,我需要一個幫助,請爲同樣任務的其他概念,我從視圖控制器移動到第二視圖使用presentviewcontroller方法,比第二視圖我有按鈕方法回到viewcontroller我如何編寫代碼,.. ..在此先感謝 – Youaregreat

+0

@ Youaregreat-寫入按鈕方法[self dismissViewControllerAnimated:YES completion:nil]; – iPatel

相關問題