Created
June 17, 2012 11:41
-
-
Save TomLiu/2944298 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
NSFont *font = [NSFontsystemFontOfSize:14.0]; | |
NSShadow *textShadow = [[NSShadowalloc] init]; | |
[textShadow setShadowColor:[NSColorcolor whiteColor]]; | |
[textShadow setShadowOffset:CGSizeMake(0, -1.0)]; | |
NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObjects:[NSArrayarrayWithObjects:font, textShadow, nil] | |
forKeys:[NSArrayarrayWithObjects:NSFontAttributeName, NSShadowAttributeName, nil]]; | |
CGSize size = [@"string" sizeWithAttributes:attrsDictionary]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment