---
title: onImage
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiswitch/onimage
---

# onImage

The image displayed when the switch is in the on position.

## Declaration

```swift
var onImage: UIImage? { get set }
```

## Discussion

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

### Deprecated

- [offImage](uikit/uiswitch/offimage.md)
