Skip to content

Is On set to true = wrong appearance #15

@peseriusz

Description

@peseriusz

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions