Skip to content

Instantly share code, notes, and snippets.

@codeswimmer
Created November 16, 2011 23:13
Show Gist options
  • Select an option

  • Save codeswimmer/1371821 to your computer and use it in GitHub Desktop.

Select an option

Save codeswimmer/1371821 to your computer and use it in GitHub Desktop.
iOS: drawShadowedText
-(void)drawShadowedText
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGFloat shadowHeight = 2.0;
CGContextSetShadowWithColor(context, CGSizeMake(1.0, -shadowHeight), 0.0, [[UIColor orangeColor] CGColor]);
[@"March" drawInRect:monthRect withFont:font];
CGContextRestoreGState(context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment