AMScrollingNavbar icon indicating copy to clipboard operation
AMScrollingNavbar copied to clipboard

Navigation bar background color changing

Open Okizeme opened this issue 4 years ago • 6 comments

Describe the bug I updated from version 5.6.1 to 5.7.2 and I now have a scrolling nav bar that change color after scrolling or navigating to another controller. Note that my nav bar has it's color set using appearance at the beginning of the app, but somehow it changes from white to grey. This bug was probably introduced by #392 or #399.

To Reproduce Steps to reproduce the behavior:

  1. Set the background/tint color of all UINavigationBar to a light color using appearance when the app starts
  2. Make a controller with a scrollview that has a dark background color and a scrolling nav bar on top
  3. Start the app and scroll to reduce the nav bar and scroll to top again or push an other view controller and come back

Expected behavior The color of the scrolling nav bar should stay the same

Okizeme avatar May 06 '21 03:05 Okizeme

Same is happening for me, have to downgrade to 5.7.0. Spent many hours trying to figure out what is causing this after swift packages update.

yavl98 avatar May 11 '21 03:05 yavl98

Yup, it was #399 I'm looking into a fix to keep that fix too.

andreamazz avatar May 11 '21 09:05 andreamazz

Ok, this seems like a UIKit bug to me, updating navigationBar.standardAppearance.titleTextAttributes [NSAttributedString.Key.foregroundColor] changes the tint color for some reason. I've disabled that line for now, I'll release a new version.

andreamazz avatar May 11 '21 09:05 andreamazz

5.7.3 is up

andreamazz avatar May 11 '21 09:05 andreamazz

I've disabled that line for now, I'll release a new version.

Any plans to reintroduce the title alpha updating at some point? iOS15 forces us to use the new way of setting navigation bar appearance and now the title alpha is not correctly set when the navigation bar is hiding. (It does work when I uncomment the lines that were commented though or if I use a custom title view)

Edit: I can of course still use 5.7.2 for now, as the tint color seems to not be a problem for me. Just thinking when iOS15 is released this might be a problem for a lot of people.

PGHM avatar Aug 16 '21 10:08 PGHM

@PGHM Yeah, for the time being you can use 5.7.2, the only change is that one. Currently I don't have much time to work on this, hopefully I'll do a round of compatibility fixes for iOS15 before its release.

andreamazz avatar Aug 23 '21 13:08 andreamazz