ios - large Navigation Bar backGround gets clear color when swiping back to root viewController

von Satoshi Nakamoto

ios - large Navigation Bar backGround gets clear color when swiping back to root viewController

Hey guys i've used largeNavigationBar and it's ok until i swipe back to root view controller and large navigation gets clear color in a nasty way. here's the code:



func largeNavigationTitle()

self.navigationController?.view.backgroundColor = VVUtility.navigationBarColor()
let productTitle = request?.product?.name
self.navigationItem.title = "(productTitle ?? " ")".localized()
self.navigationController?.navigationBar.titleTextAttributes =

if #available(iOS 11.0, *)
self.navigationController?.navigationBar.prefersLargeTitles = true
self.navigationController?.navigationBar.backgroundColor = VVUtility.splashBackGroundColor()
self.navigationController?.navigationBar.largeTitleTextAttributes =
else
// Fallback on earlier versions



I've recalled largeNavigationTitle() in both viewWillAppear and viewDidLoad



UPDATE



here is screenshot of two states:
before swiping: imgur.com/a/ZcSOrov
when swiping: imgur.com/a/DYeeot8





Source link

Read the full article
Porträt von Satoshi Nakamoto

Satoshi Nakamoto

Zur Person

Satoshi Nakamoto