I have a label in 2 lines in my app but the last word in the first line breaks in two rows. For example if last word is 'home' I have h in the first line and ome in the second. How can I fix that?
UPDATE:
Put over IB and in code word wrap but without success.
Code part:
...
cell.leftArticleTitleLabel.lineBreakMode = NSLineBreakByWordWrapping;
[cell.leftArticleTitleLabel setLineBreakMode:TRUE];
cell.leftArticleTitleView.frame = CGRectMake(cell.leftArticleTitleView.frame.origin.x, 40, 159, 40);
cell.leftArticleTitleLabel.frame = CGRectMake(cell.leftArticleTitleLabel.frame.origin.x, cell.leftArticleTitleLabel.frame.origin.y, 149, 40);
...
UPDATE 2: Solved
I should put "setLineBreakMode:TRUE" first :-)
...
[cell.leftArticleTitleLabel setLineBreakMode:TRUE];
cell.leftArticleTitleLabel.lineBreakMode = NSLineBreakByWordWrapping;
cell.leftArticleTitleView.frame = CGRectMake(cell.leftArticleTitleView.frame.origin.x, 40, 159, 40);
cell.leftArticleTitleLabel.frame = CGRectMake(cell.leftArticleTitleLabel.frame.origin.x, cell.leftArticleTitleLabel.frame.origin.y, 149, 40);
...