Skip to content

Instantly share code, notes, and snippets.

View boundsj's full-sized avatar

Jesse Bounds boundsj

View GitHub Profile
@jad
jad / iPhone: Drawing a Drop Shadow
Created May 2, 2009 17:48
Simple example of drawing a drop shadow with Core Graphics.
- (void)drawRect:(CGRect)rect
{
[super drawRect:rect];
rect = [self bounds];
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
// use the same background color as the view, but with an alpha of 1.0