Created
March 16, 2015 10:14
-
-
Save dopcn/d62262b6ceec1dc783cd to your computer and use it in GitHub Desktop.
NSLineBreakByWordWrapping
This file contains 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 characters
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy]; | |
paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping; | |
paragraphStyle.alignment = NSTextAlignmentCenter; | |
[str drawInRect:rect withAttributes: @{NSFontAttributeName: f1, | |
NSParagraphStyleAttributeName: paragraphStyle }]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment