<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -",
    "tvOS: 15.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIButton/Configuration-swift.struct/automaticallyUpdateForSelection",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So8UIButtonC5UIKitE13ConfigurationV31automaticallyUpdateForSelectionSbvp"
  },
  "title" : "automaticallyUpdateForSelection"
}
-->

# automaticallyUpdateForSelection

A Boolean value that determines whether the style automatically updates when the button is in a selected state.

```
var automaticallyUpdateForSelection: Bool { get set }
```

## Discussion

The default value is <doc://com.apple.documentation/documentation/Swift/true> for the [`plain()`](/documentation/UIKit/UIButton/Configuration-swift.struct/plain()), [`gray()`](/documentation/UIKit/UIButton/Configuration-swift.struct/gray()), and [`tinted()`](/documentation/UIKit/UIButton/Configuration-swift.struct/tinted()) configurations. Set this value to <doc://com.apple.documentation/documentation/Swift/false> to customize the selection behavior.

---

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)