0
下面是我試圖,但沒有拿到代碼時定製的UIBarButtonItem不改變,請任何事先知道TEXTCOLOR按
UIButton *doneButton = [UIButton buttonWithType:UIButtonTypeSystem];
doneButton.frame = CGRectMake(0.0, 0.0, 48.0, 32.0);
[doneButton setTitle:@"Done" forState:UIControlStateNormal];
[doneButton setTitleColor:[UIColor colorWithRed:37/255.0 green:180/255.0 blue:185/255.0 alpha:1.0] forState:UIControlStateNormal];
[doneButton setTitleColor:[UIColor colorWithRed:76.0/255.0 green:76.0/255.0 blue:76.0/255.0 alpha:1.0] forState:UIControlStateHighlighted|UIControlStateSelected];
[doneButton.titleLabel setFont:[CSUtilities latoRegularFontForSize:18.0]];
[doneButton setBackgroundColor:[UIColor clearColor]];
[doneButton addTarget:self action:@selector(doneAction:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *doneButtonItem = [[UIBarButtonItem alloc] initWithCustomView:doneButton];
self.navigationItem.rightBarButtonItem = doneButtonItem;
http://stackoverflow.com/questions/21084316/change-the-default-font-of-back-button-in-uinavigationcontroller/21084347#21084347 –