<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISwitch/preferredStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISwitch(py)preferredStyle"
  },
  "title" : "preferredStyle"
}
-->

# preferredStyle

The preferred display style for the switch.

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

## 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`](/documentation/UIKit/UISwitch/Style-swift.enum/automatic). For a list of styles, see [`UISwitch.Style`](/documentation/UIKit/UISwitch/Style-swift.enum).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)