Created
August 1, 2013 07:29
-
-
Save peerasak-u/6129193 to your computer and use it in GitHub Desktop.
NSShadow Example
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
NSShadow *textShadow = [[NSShadow alloc] init]; | |
textShadow.shadowColor = [UIColor darkGrayColor]; | |
textShadow.shadowBlurRadius = 1.2; | |
textShadow.shadowOffset = CGSizeMake(1,1); | |
NSDictionary *attributes = @{NSForegroundColorAttributeName: [UIColor blackColor], | |
NSShadowAttributeName: textShadow | |
}; | |
NSMutableAttributedString *testString = [[NSMutableAttributedString alloc] initWithString:@"Testing Attributed Strings"]; | |
[testString setAttributes:attributes range:NSMakeRange(0, testString.length)]; | |
firstAlphabetLabel.attributedText = testString; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment