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

Modal view #3

Open
gbmksquare opened this issue Jan 2, 2014 · 2 comments
Open

Modal view #3

gbmksquare opened this issue Jan 2, 2014 · 2 comments

Comments

@gbmksquare
Copy link

I have CRGradientNavigationBar set to translucnet=NO, and it works great.

But when I call a modal view which also has translucent=NO the color gets darker.

How can I have modal view get the same color?

Navigation bar
ios simulator screen shot 2014 1 2 12 59 28

Navigation bar in modal view
ios simulator screen shot 2014 1 2 12 59 31

@christianroman
Copy link
Owner

I'm trying to solve the problem.

I'm not sure if this could solve your problem. A temporally solution for me is (example):

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    YourViewController *yourViewController = [[YourViewController alloc] init];

    UINavigationController *navigationController = [[UINavigationController alloc] initWithNavigationBarClass:[CRGradientNavigationBar class] toolbarClass:nil];
    [[navigationController navigationBar] setTranslucent:NO];

    // Notice that you don't need to reconfigure the gradient colors    

    [navigationController setViewControllers:@[yourViewController]];

    [self.navigationController presentViewController:navigationController animated:YES completion:nil];

    //[tableView deselectRowAtIndexPath:indexPath animated:YES];
}

This is not the best solution. I'm working on it.

@gbmksquare
Copy link
Author

This solution didn't work out for me..

I'm using IBAction on the gear icon on the first picture to present the modal view.

In storyboard, I've set navigation bar in parent view controller to CRGradientNavigationBar, and also navigation bar in modal view to CRGradientNavigationBar.

If translucency is set to NO in modal view, the color is dark no matter what parent translucency is.

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

2 participants