修改NavigationBarItem的字型大小和顏色的使用方法,navigationbaritem
//建立一個左邊按鈕 UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithTitle:@"<" style:UIBarButtonItemStylePlain target:self action:@selector(clickLeftButton)]; // leftButton. [leftButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"Helvetica-Bold" size:17.0], NSFontAttributeName, [UIColor greenColor], NSForegroundColorAttributeName, nil] forState:UIControlStateNormal]; //建立一個右邊按鈕 UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"登陸" style:UIBarButtonItemStyleDone target:self action:@selector(clickRightButton)]; [rightButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"Helvetica-Bold" size:17.0], NSFontAttributeName, [UIColor greenColor], NSForegroundColorAttributeName, nil] forState:UIControlStateNormal];