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

Is On set to true = wrong appearance #15

Open
peseriusz opened this issue Jun 21, 2021 · 0 comments
Open

Is On set to true = wrong appearance #15

peseriusz opened this issue Jun 21, 2021 · 0 comments

Comments

@peseriusz
Copy link

So, I'm using PWSwitch in my cells, and when first switch state is set to ON, then there is no colour for this state. When I press switch twice, then colour is set properly.
PWSwitch is added in xib, colours in PWSwitch.appearance(), and state is updated in sth. like:

func configure(with viewModel: CellViewModel) {
        titleLabel.text = viewModel.mainTitle
        descriptionLabel.text = viewModel.description

        switchButton.setOn(viewModel.isSwitchOn, animated: false)
        switchButton.isHidden = viewModel.isSwitchHidden
}

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

1 participant