corner radius
This commit is contained in:
parent
eb193b16de
commit
4da8eddd8d
@ -50,7 +50,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
private var knobView: View = {
|
private var knobView: View = {
|
||||||
let view = View()
|
let view = View()
|
||||||
view.backgroundColor = .white
|
view.backgroundColor = .white
|
||||||
view.layer.cornerRadius = Toggle.getKnobHeight() / 2.0
|
view.layer.cornerRadius = 14
|
||||||
return view
|
return view
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -205,9 +205,6 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
knobHeightConstraint?.constant = Self.getKnobHeight()
|
knobHeightConstraint?.constant = Self.getKnobHeight()
|
||||||
knobWidthConstraint?.constant = Self.getKnobWidth()
|
knobWidthConstraint?.constant = Self.getKnobWidth()
|
||||||
|
|
||||||
layer.cornerRadius = Self.getContainerHeight() / 2.0
|
|
||||||
knobView.layer.cornerRadius = Self.getKnobHeight() / 2.0
|
|
||||||
|
|
||||||
changeStateNoAnimation(isOn)
|
changeStateNoAnimation(isOn)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,7 +222,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
widthConstraint = widthAnchor.constraint(equalToConstant: Self.containerSize.width)
|
widthConstraint = widthAnchor.constraint(equalToConstant: Self.containerSize.width)
|
||||||
widthConstraint?.isActive = true
|
widthConstraint?.isActive = true
|
||||||
|
|
||||||
layer.cornerRadius = Self.containerSize.height / 2.0
|
layer.cornerRadius = 15
|
||||||
backgroundColor = containerTintColor.off
|
backgroundColor = containerTintColor.off
|
||||||
|
|
||||||
addSubview(knobView)
|
addSubview(knobView)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user