---
title: preferredStyle
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiswitch/preferredstyle
---

# preferredStyle

The preferred display style for the switch.

## Declaration

```swift
var preferredStyle: UISwitch.Style { get set }
```

## Mentioned in

Choosing a user interface idiom for your Mac app Displaying a checkbox in your Mac app built with Mac Catalyst

## Discussion

Discussion Use this property to specify the display style that you prefer. If the style changes, the switch may generate a layout pass to update the display. The default style is UISwitch.Style.automatic. For a list of styles, see UISwitch.Style.

## See Also

### Setting the display style

- [Displaying a checkbox in your Mac app built with Mac Catalyst](uikit/displaying-a-checkbox-in-your-mac-app-built-with-mac-catalyst.md)
- [style](uikit/uiswitch/style-swift.property.md)
- [UISwitch.Style](uikit/uiswitch/style-swift.enum.md)
- [title](uikit/uiswitch/title.md)
