2014-09-23 62 views

回答

0

你可以試試這個:

IBOutlet UINavigationItem* barItem = /*(the bar your want to change in storyboard)*/; 
barItem.title = @"new title"; 

如果你想改變它,用barItem.title = ...self.navigationItem.title = ... 你必須確保視圖控制器(self)從UINavigationController繼承。

+0

我使用'@property(strong,nonatomic)IBOutlet UINavigationItem * bar'將UINavigationbar鏈接到我的頭文件。然而在'[_bar.title = @「newTitle」]的實現文件中;'xcode是說它缺少一個標識符。 – rmp2150 2014-09-23 01:53:38