How do I set the constraints and attributes of a button so that the button is exactly the width of its title?
How do I make a button the exact width as its title?
Add a Comment
How do I set the constraints and attributes of a button so that the button is exactly the width of its title?
If you mean button width based on it's text property, see: Views with Intrinsic Content Size
If you mean how to defeat margin padding spec'd by auto layout, you may need to do it all in code, instead.
If you mean button width based on it's text property, see: Views with Intrinsic Content Size
If you mean how to defeat margin padding spec'd by auto layout, you may need to do it all in code, instead.
In IB, in Size Inspector for the button, select, as KMT advised, Intrinsic Size as PlaceHolder.