<!--
{
  "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/Style-swift.enum/automatic",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UISwitchStyle@UISwitchStyleAutomatic"
  },
  "title" : "UISwitch.Style.automatic"
}
-->

# UISwitch.Style.automatic

A style indicating that the system chooses the appearance of the switch according to the current user interface idiom.

```
case automatic
```

## Discussion

The system chooses the [`UISwitch.Style.checkbox`](/documentation/UIKit/UISwitch/Style-swift.enum/checkbox) style when the user interface idiom is [`UIUserInterfaceIdiom.mac`](/documentation/UIKit/UIUserInterfaceIdiom/mac); otherwise, it chooses the [`UISwitch.Style.sliding`](/documentation/UIKit/UISwitch/Style-swift.enum/sliding) style.

---

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)