Change color of UISwitch in "off" state
My solution with #swift2:
let onColor = _your_on_state_colorlet offColor = _your_off_state_colorlet mSwitch = UISwitch(frame: CGRect.zero)mSwitch.on = true/*For on state*/mSwitch.onTintColor = onColor/*For off state*/mSwitch.tintColor = offColormSwitch.layer.cornerRadius = mSwitch.frame.height / 2.0mSwitch.backgroundColor = offColormSwitch.clipsToBounds = true
Result: