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