-
-
Save getaclue00/83cbf1ee3091ac00535ebe1d3708faf1 to your computer and use it in GitHub Desktop.
NSShadow Example
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
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