I am trying to construct a button using the new iOS15 button API. (Xcode 13ß3, UIKit & Storyboards)
The button has a title (aligned .leading) and an image (aligned .trailing). The button has the following layout constraints:
What I’m trying to accomplish is that the button should adjust its width based on the title content, not wrapping until the width causes the trailing constraint to be violated.
What actually happens is the the button’s text wraps. It acts as if it prefers wrapping to changing its size.
There are mentions in the documentation about disabling text wrapping for the button, but the obvious things, such as
button.titleLabel?.lineBreakMode = .byTruncatingMiddle
Has anyone whose tried working with iOS 15 buttons have any suggestions?