Created
June 17, 2012 11:44
-
-
Save TomLiu/2944306 to your computer and use it in GitHub Desktop.
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 characters
CGFloat width = 100.0; | |
NSDictionary *attrDic = [NSDictionary dictionaryWithObject:[NSFont systemFontOfSize:14.0] forKey:NSFontAttributeName]; | |
NSSize limit = NSMakeSize(width, (unsigned int)-1); | |
CGRect frame = [@"this is the test string" boundingRectWithSize:limit options:(NSStringDrawingDisableScreenFontSubstitution | NSStringDrawingUsesLineFragmentOrigin) attributes:attrDic]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment