Wednesday, October 28, 2026
HomeiOS Developmentios - UIButtonConfiguration and Storyboard content material inset

ios – UIButtonConfiguration and Storyboard content material inset

[ad_1]

So we’ve present storyboards which some views specifically UIButtons has contentEdgeInsets values set through storyboard inspector. A few of this UIButton is a customized/subclass UIButton for theme/look functions.

I’m attempt to apply the brand new UIButtonConfiguration however discover that the contentEdgeInsets values from storyboard usually are not utilized when setting the UIButtonConfiguration. I do know that the UIButton.contentEdgeInsets is ignored when UIButton.configuration is ready.

enter image description here

The picture above, the pink field is the contentEdgeInsets values from the storyboard. Whereas the blue field is the contentInsets from the UIButton.Configuration.plain()

I’m questioning if there is a strategy to create a UIButtonConfiguration which already include the contentEdgeInsets values from the storyboard? Or do I have to manually set the configuration.contentInsets of every UIButton within the supply code?

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments