I have a simple UIButton and try to get word wrap but it always shows the text in one line exceeding the button size.
NSString * text = NSLocalizedString(@\
Try:
_continueBtn.titleLabel.numberOfLines = 0;
I've tried next code:
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.frame = CGRectMake(20, 20, 70, 50);
button.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
button.titleLabel.textAlignment = NSTextAlignmentCenter;
[button setTitle:@"start loading"
forState:UIControlStateNormal];
[self.view addSubview:button];
It's working good for me: