2010-07-10 32 views
0

我想設置我的應用程序導航欄的顏色以及文本顏色。定製UINavigationBar

這是怎麼回事?

我已經看到有人向子欄目添加子視圖的解釋方法,但必須有一個更容易(苦心)的方法。

問候

回答

1

試試這個。非常未經測試(特別是最後兩行可能並不總是有效,但如果你玩弄它,你會知道它是否有效)。

navigationController.navigationBar.tintColor = [UIColor purpleColor]; 
navigationController.topViewController.title = @"ye olde title"; 
UILabel *titleView = [navigationController.navigationBar.subviews objectAtIndex:0]; 
[titleView setFont:[UIFont fontWithName:@"Zapfino" size:10.f]];