Force UILabel to display 2 lines

Step 1. Set number of lines to your label to 2.
Step 2. Set "Vertical hugging priority" to High (1000)
Step 3. Right click on your label and connect with icon at left and choose "Center Vertically".
Step 4. Right click on your label and connect with icon at left and set "Horizontal Spacing".
Step 5. If that text is static then do as suggested Igor, else, just replace @" " with @"\n" after assigning text to that label. E.g.

NSString *text = @"Какой-то Справочник"; 
self.myLabel.text = [text stringByReplacingOccurrencesOfString:@" " withString:@"\n"];

Or just set self.myLabel.lineBreakMode = NSLineBreakByWordWrapping;


In InterfaceBuilder settings of UILabel text press option+enter between "Справочник" and "МКБ".

Or set label.text = @"Справочник\nМКБ";.

And, of course, set yourLabel.numberOfLines = 2 or 0 in IB or code.


Following code may helps you and you have to make label's height enough to cover two lines.

NSString *text = @"Какой-то Справочник";
self.Label.lineBreakMode = NSLineBreakByWordWrapping;
self.Label.numberOfLines = 2;