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

A problem with the switcher button highlights. #65

Open
HyunjoonKo opened this issue Sep 11, 2020 · 2 comments
Open

A problem with the switcher button highlights. #65

HyunjoonKo opened this issue Sep 11, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@HyunjoonKo
Copy link

Ios GIF-downsized_large

If you press the button on the switcher quickly, the button is highlighted at the same time as follows.
It's a small error, but it reports.

@Jiar
Copy link
Owner

Jiar commented Sep 12, 2020

Thanks for feedback!

This is definitely a bug and I will try to fix it. And are you use SegementSlideDefaultSwitcherView?

@Jiar Jiar added the bug Something isn't working label Sep 12, 2020
@HyunjoonKo
Copy link
Author

HyunjoonKo commented Sep 14, 2020

@Jiar
Yes. I'm using SegementSlideDefaultSwitcherView.

    // MARK: - SegementSlide

    private let defaultSwitcherView = SegementSlideDefaultSwitcherView()
    private var indicatorWidth: CGFloat = ...
    
    public override func segementSlideSwitcherView() -> SegementSlideSwitcherDelegate {
        defaultSwitcherView.delegate = self
        defaultSwitcherView.ssDataSource = self
        defaultSwitcherView.backgroundColor = .mainBlack
        return defaultSwitcherView
    }
    
    open var switcherConfig: SegementSlideDefaultSwitcherConfig {
        let font = UIFont.flexible(systemFontSize: 12.0, weight: .medium)
        let color = UIColor.white
        return SegementSlideDefaultSwitcherConfig(type: .segement,
                                                  normalTitleFont: font,
                                                  selectedTitleFont: font,
                                                  normalTitleColor: color.withAlphaComponent(0.3),
                                                  selectedTitleColor: color,
                                                  indicatorWidth: indicatorWidth,
                                                  indicatorHeight: 1.0,
                                                  indicatorColor: .white)
    }
    
    open override func setupSwitcher() {
        super.setupSwitcher()
        defaultSwitcherView.config = switcherConfig
    }

    // MARK: - ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants