I have subclassed UIImageView and am trying to add a shadow to the image inside 
of it. However I'm not getting anything at all and I'm not sure what to do.

Below is the code I am using for this:

-(void)addShadow
{
        UIGraphicsBeginImageContext(self.frame.size);//If I don't add this line 
I get invalid context error.
        CGContextRef context = UIGraphicsGetCurrentContext();
        CGContextSetShadow(context, CGSizeMake(.5,.5),.2);
        [self setNeedsDisplay];
}_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to