Customize UINavigationBar.appearance() on ScrollViewDidScroll?

76 Views Asked by At

Is it still possible to customize the navigation bar on ScrollViewDidScroll now?

For example:

1

1

There are 1 best solutions below

0
On

Change it using:

self.navigationController?.navigationBar.isTranslucent = False

And remove:

self.navigationController?.navigationBar.setBackgroundImage...
self.navigationController?.navigationBar.shadowImage = UIImage()

Then modify the barTintColor when user scrolls.