I've been wondering, is there a nice way to make `UIButtons` with multi-line `titleLabel` in Interface Builder? I've found none and puttin a separate `UILabel` on top of each button and tracking it's color on press and other events is not very straightforward. 

Maybe there are better alternatives done in code if there's no such way in IB?
['https://Stackoverflow.com/questions/18659832', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1313939/']
You can do solely in Interface Builder a couple ways.

* First by simply setting the wrap feature. This offers limited customizability though.
* For more customizability, change the "Plain Text" to "Attributed Text" and then you can do most things without any code.
Just to mention if one does not want word wrap but still want to achieve multi line title on a UIButton it can be done by setting lineBreakMode before numberOfLines,
This is because lineBreakMode seems to cancel out numberOfLines set hence we are doing it in this order.

Swift:

> 
> button.titleLabel?.lineBreakMode = NSLineBreakMode.byTruncatingTail
> 
> 
> button.titleLabel?.numberOfLines = 2
> 
> 
> button.setTitle(myTitle, for: UIControlState.normal)
> 
> 
>