updateConfiguration(using:)
Updates the view’s configuration using the current state.
Declaration
@MainActor @objc(_bridgedUpdateConfigurationUsingState:) @preconcurrency dynamic func updateConfiguration(using state: UIViewConfigurationState)Discussion
Avoid calling this method directly. Instead, use setNeedsUpdateConfiguration() to request an update.
Override this method in a subclass to update the view’s configuration using the provided state.
In iOS 18 and later, UIKit supports automatic trait tracking inside this method for traits from this view’s traitCollection. For more information, see Automatic trait tracking.
This method supports automatic observation tracking. For more information, see Updating views automatically with observation tracking.