MoZhouqi / KMNavigationBarTransition

A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically.
MIT License
3.38k stars 457 forks source link

ContainerView is changing to white during tranistion #3

Closed m1entus closed 8 years ago

m1entus commented 8 years ago

Hi, i presented view controller using blur effect on background, so i wanted to all view controllers have clearColor, during - (void)km_viewWillLayoutSubviews { you are setting containerView to background color and my presented controllers looks ugly, do you really need to set background color to white color?

MoZhouqi commented 8 years ago

If I don't set the background color of the container view, the navigation bar will look ugly when transitioning if the navigation bar is translucent, you can try it in the demo. To solve this problem, I can set the background color of self.navigationController.navigationBar.superview or self.view.window to white color, instead of setting the background color of the container view, or add a global variable to decide whether you need to set the background color. Do you have any idea?

m1entus commented 8 years ago

I would make category for UINavigationController and make getter for background color for container view, and then would be easy to override in each UINavigationController subclass, because UINavigationControleller can always ask topViewController for it if needed.

m1entus commented 8 years ago

btw. I have check transitioning if navigation bar is translucent on your demo and i don't see any issue and ugly looking navigation bar on it .. ?

MoZhouqi commented 8 years ago

The color on the right side of the navigation bar is darker when transitioning.

simulator screen shot jan 19 2016 10 56 08 am

MoZhouqi commented 8 years ago

Hi, I will close the issue, if you have any further questions, please feel free to reopen it.

m1entus commented 8 years ago

But this is still a issue could you gix that and add property for color in your navigation controller category? Do you want PR from me ?