Hi,
is there an easy way to change the background color of the navigation item on top of a view? I have a navigation based app and I only want that one view gets another background color. I created the views mainly with IB. I found the following solution (not tested):
float r=10;
float g=55;
float b=130;
float a=0;
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 120, 30)];
[label setBackgroundColor:[UIColor colorWithRed:r/255.f
green:g/255.f
blue:b/255.f
alpha:a/255.f];];
[self.navigationController.navigationBar.topItem setTitleView:label];
[label release];
Is there an easier way like
[navigationController.navigationBar setBackgroundColor:blueColor]
Or can I do it with IB (but without having the same color in every view)?
Many thanks in advance!
Cheers