Instance Property

offImage

In iOS 6 and earlier, the image displayed when the switch is in the off position.

Declaration

var offImage: UIImage? { get set }

Discussion

In iOS 7 and later, this property has no effect.

In iOS 6, this image represents the interior contents of the switch. The image you specify is composited with the switch’s rounded bezel and thumb to create the final appearance.

See Also

Customizing the Appearance of the Switch

var onTintColor: UIColor?

The color used to tint the appearance of the switch when it is turned on.

var thumbTintColor: UIColor?

The color used to tint the appearance of the thumb.

var onImage: UIImage?

In iOS 6 and earlier, the image displayed when the switch is in the on position.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software