Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Orthographic hyphenation word in IOS

Is there a way of orthographic hyphenation word?

Something like this:

NSStiring *string = @"In June 2010 at the World Wide Developers Conference, Apple announced version 4 of Xcode during the Developer Tools State of the Union address.";
UILabel *label = [[UILabel alloc] init];
label.text = string;

And if frame UILabel will be narrow, get next:

In June 2010 at
the World Wide
Developers Con-
ference, Apple
announced ver-
sion 4 of Xcode
during the Devel-
oper Tools State
of the Union ad-
dress.

like image 415
Dickordia Avatar asked May 11 '13 23:05

Dickordia


1 Answers

Use an NSAttributedString with an NSParagraphStyle with a hyphenationFactor of 1.

like image 142
matt Avatar answered Sep 20 '22 02:09

matt