<!--
{
  "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/updated(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So8UIButtonC5UIKitE13ConfigurationV7updated3forAeB_tF"
  },
  "title" : "updated(for:)"
}
-->

# updated(for:)

Returns a copy of the configuration, updated for the given button.

```
func updated(for button: UIButton) -> UIButton.Configuration
```

## Parameters

`button`

A button to use as a basis for the configuration.

## Return Value

An updated configuration. This method preserves custom values set on the configuration, and updates default values based on the button state.

## Discussion

---

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)