1

I have a translucent navigation bar with blurred content.

I want to push a new view controller with another translucent navigation bar but no content to blur (yet), so I do a simple navigationController?.pushViewController(vc, animated: true).

However, during transition the old navigation bar overrides the new one for a split second, then it goes back to normal. How to avoid this and achieve a smooth transition?

I tried playing with isTranslucent property of navigation bar inside viewWillAppear but no luck.

Here's a gif to understand the problem:

enter image description here

Pierre.Vriens
  • 2,117
  • 75
  • 29
  • 42
John Doe
  • 141
  • 10
  • check this link http://stackoverflow.com/questions/39835420/navigationbar-delay-updating-bartintcolor-ios10/40255483#40255483 – Joe Apr 01 '17 at 16:40
  • I have tried overriding `isViewLoaded` but I realised I actually don't have any code for updating the navigation bar, since it's the same as the previous view controller. I have tried [this answer](http://stackoverflow.com/questions/39511088/navigationbar-coloring-in-viewwillappear-happens-too-late-in-ios-10/39518148#39518148) too but I don't know what to put in there to update the navigation bar appearance. – John Doe Apr 01 '17 at 19:54
  • Have the same problem, and can't find the solution. Have you found it? Thank you in advance. – Alexey Chekanov Oct 03 '19 at 02:08

1 Answers1

0

To keep the navigation bar translucent while and after transition, check the "Under Top Bars" property in the inspector. enter image description here

Shobhit C
  • 828
  • 10
  • 15