I\'ve learned that we can change the UISwitch button appearance in its \"on\" state, but is it also possible to change the color of the UISwitch in the \"off\" state?
Swift 5:
import UIKit extension UISwitch { func set(offTint color: UIColor ) { let minSide = min(bounds.size.height, bounds.size.width) layer.cornerRadius = minSide / 2 backgroundColor = color tintColor = color } }