Skip to content

Custom Navigation Bar issue in the RootViewController #36

mikesilvers opened this Issue Mar 11, 2011 · 2 comments

2 participants


I am trying to modify the background color of the navigation bar. The problem I am running into is that the color change only occurs up to where a UISplitViewController would end. The remaining section of the navigation bar os the default color. Here is how I am changing the color:
// the darker tint
float rd = 157.00/255.00;
float gr = 140.00/255.00;
float bl = 114.00/255.00;

// this creates the gradiant
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = self.navigationController.navigationBar.bounds;
gradient.colors = [NSArray arrayWithObjects: (id)[[UIColor whiteColor] CGColor], (id)[[UIColor colorWithRed:rd green:gr blue:bl alpha:1] CGColor], nil ];
[self.navigationController.navigationBar.layer insertSublayer:gradient atIndex:0];
sharmaji commented Jun 9, 2012

I too getting the same problem. Did you get any solution on this?? Kindly let me know as well.
Thanks in advance.


I was not able to look anymore at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.