views:

46

answers:

1

Hey guys,

What would be the best way to implement a multiline text on a UIButton for iPhone SDK 3.2?

Thanks! Nicolas.

A: 

If adding newline characters (\n) to your title text doesn't work, you could try adding a UILabel with an appropriate numberOfLines as a subview of the button.

Noah Witherspoon
Let me verify and I'll keep you posted. Thanks!
NicolasBL
I found it guys. Keep it simple. As you know, there is a UILabel in the button. So, you can set the numberOfLines to 0 and textAlignment to UITextAlignmentCenter for the label. It will do the job.
NicolasBL