Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double Navigation Bars #12

Open
spiderguy84 opened this issue Jan 15, 2015 · 0 comments
Open

Double Navigation Bars #12

spiderguy84 opened this issue Jan 15, 2015 · 0 comments

Comments

@spiderguy84
Copy link

My app is a Tab Bar Controller app, in which each tab is a NavigationController. I have my code set as:

`UINavigationController *navigationController = [[UINavigationController alloc] initWithNavigationBarClass:[CRGradientNavigationBar class] toolbarClass:nil];

UIColor *firstColor = [UIColor colorWithRed:255.0f/255.0f green:42.0f/255.0f blue:104.0f/255.0f alpha:1.0f];
UIColor *secondColor = [UIColor colorWithRed:255.0f/255.0f green:90.0f/255.0f blue:58.0f/255.0f alpha:1.0f];

NSArray *colors = [NSArray arrayWithObjects:firstColor, secondColor, nil];
// or NSArray *colors = [NSArray arrayWithObjects:(id)UIColorFromRGB(0xf16149).CGColor, (id)UIColorFromRGB(0xf14959).CGColor, nil];

[[CRGradientNavigationBar appearance] setBarTintGradientColors:colors];
[[navigationController navigationBar] setTranslucent:NO]; // Remember, the default value is YES.

[navigationController setViewControllers:@[tabBarController]];

[self.window setRootViewController:navigationController];`

However, I am getting double navigation bars, with title and uibarbuttonitems being added to the 2nd, and not the gradient one. Any suggestions?

ios simulator screen shot jan 15 2015 9 56 47 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant