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

ScrollingNavigationController.updateNavbarAlpha steps on third party toolbar buttons #323

Open
tigaris opened this issue Aug 3, 2018 · 3 comments

Comments

@tigaris
Copy link

tigaris commented Aug 3, 2018

updateNavbarAlpha hammers the alphas of all subviews of everything on the toolbar, including some third party libraries we use that do special things with their toolbar buttons.

the specific problem is the nested function:

    func setAlphaOfSubviews(view: UIView, alpha: CGFloat) {
        view.alpha = alpha
        view.subviews.forEach { setAlphaOfSubviews(view: $0, alpha: alpha) }
    }

the easiest solution would be to make this function a public function instead of nested function inside a private function, so we could just override the behavior with our own logic.

otherwise adding a property ScrollingNavigationController to exclude button subviews by name or class would be needed.

@andreamazz
Copy link
Owner

Hi @tigaris
I like the second approach better, I'll add it to the next release

@andreamazz
Copy link
Owner

Can you check branch issue-323 and test the hideExclusions field?

@yvdorofeev
Copy link

Has this issue been fixed?

On the same note, is it necessary to recursively process all subviews? I would think if you set alpha on parent view, it'll just hide or show all its subviews.

The particular issue I'm having is a simple text field with placeholder in title view. This recursive processing on view load sets alpha to 1 on the placeholder and it appears black instead of light gray. I just ended up commenting out that line for the time being.

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

3 participants