Skip to content

Instantly share code, notes, and snippets.

@peerasak-u
Created August 1, 2013 07:29
Show Gist options
  • Save peerasak-u/6129193 to your computer and use it in GitHub Desktop.
Save peerasak-u/6129193 to your computer and use it in GitHub Desktop.
NSShadow Example
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