Skip to content

Transparency effect glitches when scrolling slowly #325

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

Closed
RemiGuyon opened this issue Sep 4, 2018 · 2 comments
Closed

Transparency effect glitches when scrolling slowly #325

RemiGuyon opened this issue Sep 4, 2018 · 2 comments

Comments

@RemiGuyon
Copy link

Describe the bug

The transparency effect on the elements of the navBar has glitches when dragging really slowly.

To Reproduce

Steps to reproduce the behavior:

  1. Open the demo
  2. Take the ScrollView sample for example
  3. Start dragging the view really slowly
  4. Observe the glitches on the transparency of the elements of the navBar

Expected behavior

The transparency effect should be really smooth as when you scroll the view at normal speed.

When looking at the code I noticed this in the updateNavbarAlpha() method:

navigationBar.subviews
      .filter(shouldHideView)
      .forEach { setAlphaOfSubviews(view: $0, alpha: alpha) }

It looked like to me that this was redundant with the rest of the method. So I tried to remove it and then everything worked as expected, no more glitches. I didn't notice any regression on the rest of the demo. Did I miss something about this piece of code?

@andreamazz
Copy link
Owner

Hey @RemiGuyon
that code handles the subviews of the navigation bar, it works when there are custom views inside the navigation items. Not sure why this happens, I can see the glitch in the navigation title, but if I comment out everything but those lines, it's not affected, so that's odd 🤔

@andreamazz
Copy link
Owner

Should be fixed now, See #338

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

No branches or pull requests

2 participants