2011-07-21 27 views

回答

5

您必須編寫下面的代碼呈現modalView控制器..

yourModelController =[[Yourmodelcontroller alloc]init]; 

UINavigationController *controller = [[UINavigationController alloc] initWithRootViewController: yourModelController]; 

[[self navigationController] presentModalViewController:controller animated:YES]; 
[controller release]; 

然後在viewDidLoad - 方法u需要寫

self.title [email protected]"My View"; 

它肯定會工作。希望它能幫助你。

0

請試試這個:

self.title = NSLocalizedString(@"My View", @"Comment goes here"); 
0

您可以使用UINavigationItem財產viewDidLoad中()設置導航欄的標題。

Swift代碼:

self.navigationItem.title = "Bar Title" 
相關問題