LabelSwitch icon indicating copy to clipboard operation
LabelSwitch copied to clipboard

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

Open kostiag opened this issue 3 years ago • 0 comments

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

kostiag avatar May 10 '21 13:05 kostiag