Adding a shadow to a UIImage in a UIImageview
Adding a shadow to a UIImage in a UIImageview
- Subject: Adding a shadow to a UIImage in a UIImageview
- From: Development <email@hidden>
- Date: Sat, 19 Dec 2009 21:34:56 -0700
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 (email@hidden)
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:
This email sent to email@hidden