Created
May 30, 2015 11:02
-
-
Save jeffbailey/b5b8b0b60016516e05ed to your computer and use it in GitHub Desktop.
Revisions
-
jeffbailey created this gist
May 30, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ Thanks to http://radex.io/watch/hyphenation/?utm_campaign=iOS%2BDev%2BWeekly&utm_source=iOS_Dev_Weekly_Issue_200 extension WKInterfaceLabel { func setHyphenatedText(text: String) { let style = NSMutableParagraphStyle() style.hyphenationFactor = 1 let attributes = [NSParagraphStyleAttributeName: style] setAttributedText(NSAttributedString(string: text, attributes: attributes)) } }