I can't seem to find the equivalent. I don't think imagePadding is the right UIButtonConfiguration property. What would be the appropriate refactor the header comments just say this
// The effect of these properties can be replicated via UIButtonConfiguration.contentInset and UIButtonConfiguration.imageToTitlePadding. They are ignored when a configuration is set.
@property(nonatomic) UIEdgeInsets contentEdgeInsets API_DEPRECATED("This property is ignored when using UIButtonConfiguration", ios(2.0,15.0), tvos(2.0,15.0)) UI_APPEARANCE_SELECTOR; // default is UIEdgeInsetsZero. On tvOS 10 or later, default is nonzero except for custom buttons.
@property(nonatomic) UIEdgeInsets titleEdgeInsets API_DEPRECATED("This property is ignored when using UIButtonConfiguration", ios(2.0,15.0), tvos(2.0,15.0)); // default is UIEdgeInsetsZero
@property(nonatomic) UIEdgeInsets imageEdgeInsets API_DEPRECATED("This property is ignored when using UIButtonConfiguration", ios(2.0,15.0), tvos(2.0,15.0)); // default is UIEdgeInsetsZero
And I don't see imageToTitlePadding on Apple's public documentation so I'm not sure how to use it.
There isn't a direct conversion, but the UIButtonConfiguration.contentInset
always applies (its an inset from the button bounds to any content at all). UIButtonConfiguration.imagePadding
applies if there is text & image and not otherwise (looks like the comment in the header wasn't fixed when that property got renamed!)
If you have an image-only button, you probably just want contentInset
.