修改UINavigationBar (導航欄)上NavigationBarItem 的字型大小和顏色的使用方法
//建立一個左邊按鈕
UIBarButtonItem *leftButton = [[UIBarButtonItemalloc] initWithTitle:@"<"style:UIBarButtonItemStylePlaintarget:selfaction:@selector(clickLeftButton)];
// leftButton.
[leftButton setTitleTextAttributes:[NSDictionarydictionaryWithObjectsAndKeys:
[UIFont
[UIColor greenColor], NSForegroundColorAttributeName,
nil]
forState:UIControlStateNormal];
//建立一個右邊按鈕
UIBarButtonItem *rightButton = [[
[rightButton setTitleTextAttributes:[NSDictionarydictionaryWithObjectsAndKeys:
[UIFont fontWithName:@"Helvetica-Bold" size:17.0], NSFontAttributeName
[UIColor greenColor], NSForegroundColorAttributeName,
nil]
forState:UIControlStateNormal];