Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Chirone

macrumors 6502
Original poster
Mar 2, 2009
279
0
NZ
please note that i have to make this for 2.2.1 so telling me to use button.label.numberOfLines isn't any help

in IB i could tell the button to use line breaks with word wrap and make the button vertically bigger to see all the text

but doing it programatically it doesn't just happen...
to make the button i type:
Code:
UIButton *buttonView = [[UIButton alloc] initWithFrame: frame];
[buttonView addTarget: target action: sel forControlEvents: UIControlEventTouchUpInside];	
	[buttonView setTitle: NSLocalizedString(@"buttonKey", @"") forState: UIControlStateNormal];
buttonView.lineBreakMode = UILineBreakModeCharacterWrap;
when in english the string shows up fine, it's all there
when in spanish it only shows one line...
how can i make the button realise it needs to draw the text on multiple lines?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.