Skip to content

Should be able to center switch in the View when adding in code #22

@kostiag

Description

@kostiag

When adding programmatically the code starts at the center of the view, but if I want the switch to be centered it has to be manually adjusted by
LabelSwitch(center: CGPoint(x: self.switchStackView.center.x - X, y: self.switchStackView.center.y), leftConfig: ls, rightConfig: rs)

attempting to adjust center when calculating center
self.center.x = self.center.x - diameter - 2 * circlePadding, this is still missing about 8-10 points that should be offset but not sure why

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