how to set a multiline as title of a UIButton in iPhone programming
pls help me ..
thanks and regards ..
how to set a multiline as title of a UIButton in iPhone programming
pls help me ..
thanks and regards ..
someButton.lineBreakMode = UILineBreakModeWordWrap;
Be sure to try to get in the habit of consulting the documentation before posting a question. Apple's documentation is pretty comprehensive, and things like this generally get covered.
hihi,
There is a property of UIButton called lineBreakMode which will allow you to add multiline titles. The two main things I would set it to are UILineBreakModeWordWrap or UILineBreakModeCharacterWrap.
UILineBreakModeWordWrap wraps the last word and UILineBreakModeCharacterWrap wraps at the lastcharcter.
looks like:
instanceOfUIButton.lineBreakMode = UILineBreakModeWordWrap;
or
instanceOfUIButton.lineBreakMode = UILineBreakModeCharacterWrap;
hope that's what your after
UIButton doesn't display multiple lines. The way to make it do so is to addSubview a UILabel to the button