Ios – UIButton title alignment and multiline support

cocoa-touchiosiphoneuibuttonuikit

How do I set the title of a UIButton to be left-aligned, and how can I show multiple lines of text in a UIButton?

Best Answer

Here's the code to do the UIButton alignment in code too: -

[myButton setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];