Are there any standard methods for having two different colors for two UIBarButtonItem
s on a navigationBar
at the same time?
This could be achieve using custom UIButton
, e.g.:
UIButton *confirmBtn = [[UIButton alloc] init];
confirmBtn.titleLabel.font =[UIFont boldSystemFontOfSize:16.0f];
[confirmBtn setTitle:@"Confirm" forState:UIControlStateNormal];
confirmBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 0, 0, -40);
[confirmBtn setTitleColor:[ColorSetter colorWithHexString:@"ffd420"] forState:UIControlStateNormal];
confirmBtn.frame = CGRectMake(0, 0, 80, 50);
[confirmBtn addTarget:self action:@selector(DoneClicked:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *confirmBtnBarItem = [[UIBarButtonItem alloc] initWithCustomView:confirmBtn];
self.navigationItem.rightBarButtonItem = confirmBtnBarItem;