You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Track/border color logic is a bit tricky because of on/off animation - border completely fills in entire track and acts like background color, so sometimes you need to experiment with values to achieve desired effect.
Also there is no borderWidth property for PWSwitch
I have created a PWSwitch like so:
let customSwitch = PWSwitch(frame: CGRect(x: 0, y: 0, width: 36, height: 20))
customSwitch.borderWidth = 0
customSwitch.trackOnFillColor = .red
customSwitch.trackOffFillColor = .green
The red colour is only visible briefly during the transition and is replaced by a mustard yellow when the switch is On.
The text was updated successfully, but these errors were encountered: