views:

206

answers:

1

My current code doesnt seem to do anything:

CGContextRef currentContext = UIGraphicsGetCurrentContext(); CGContextSaveGState(currentContext);

float myColorValues[] = {1.0, 0, 0, .8};
CGColorSpaceRef myColorSpace = CGColorSpaceCreateDeviceRGB();
CGColorRef myColor = CGColorCreate(myColorSpace, myColorValues);
CGContextSetShadowWithColor (currentContext, CGSizeMake(-1, -1), 0, myColor);

//CGContextSetShadow(currentContext, CGSizeMake(-15, 20), 15);


[super drawRect: rect];

CGContextRestoreGState(currentContext);
+1  A: 

Check out this thread.

http://stackoverflow.com/questions/805872/how-do-i-draw-a-shadow-under-a-uiview

James