2013-04-18 24 views
0

我想改變我的UINavigationBar的標題顏色字體。我如何使用代碼或界面構建器來做到這一點?這可能是一個容易的,但我是新來的xcode。感謝您的幫助。的Xcode UINavigationBar的文本字體和顏色

+0

檢查這個out-- http://stackoverflow.com/questions/599405/iphone-navigation-bar-title-text-color – 2013-04-18 06:53:01

回答

0

對於編碼部分,您可以做的是使用標籤啓動標題視圖。

UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 10, 40)]; 
[myLabel setFont:[UIFont fontWithName:@"Arial" size:12]]; 
[myLabel setTextColor:[UIColor whiteColor]]; 
[myLabel setText:@"My text here"]; 
[**your navigation bar**.topItem setTitleView:myLabel]; 
相關問題