Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation bar background color changing #402

Open
Okizeme opened this issue May 6, 2021 · 6 comments
Open

Navigation bar background color changing #402

Okizeme opened this issue May 6, 2021 · 6 comments

Comments

@Okizeme
Copy link

Okizeme commented May 6, 2021

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

@yavl98
Copy link

yavl98 commented May 11, 2021

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.

@andreamazz
Copy link
Owner

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

@andreamazz
Copy link
Owner

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
Copy link
Owner

5.7.3 is up

@PGHM
Copy link

PGHM commented Aug 16, 2021

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.

@andreamazz
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants