Hello, I'm having an issue with UIButtonConfiguration not respecting the constraints of the button. I'm trying to replace a UIButton that contains a titleLabel, but the titleLabel doesn't get transferred over. So I tried setting an attributedTitle to UIButtonConfiguration, and that made the button show, but the constraints were messed up and the button was large. The constraints of the UIView created by UIButtonConfiguration overrode the UIView created from the UIButton. Is there any way to abide by the deprecated API that asks us to use UIButtonConfiguration but respect the other properties of UIButton. It doesn't feel like UIButtonConfiguration is ready for all the functionality needed in a custom UIButton.
Given what you linked to, if you want to migrate to UIButtonConfiguration
you likely want to use attributed strings instead of trying to modify the button label's font (when using the button configuration path we will always set an attributed title, which will cause the font you specify to be ignored). Basically your adoption of button configuration just for the content insets isn't really enough to get what you want from button configuration – your better off sticking with the deprecated API until you can more fully migrate to the new API.