Please if some one knows
Please if some one knows
- Subject: Please if some one knows
- From: Development <email@hidden>
- Date: Mon, 21 Dec 2009 15:19:01 -0700
I really could use some help on this shadow issue I have been having. Does any one know anything about drawing shadows around images in UIImageViews?
Below is code that gives me a shadow but the shadow is clipped to the edge of the view, how can I get an unclipped shadow?
UIGraphicsBeginImageContext(self.frame.size);
CGContextRef myContext = UIGraphicsGetCurrentContext();
float myColorValues[] = {0, 0, 0, darkness};// 3
CGColorRef myColor;// 4
CGColorSpaceRef myColorSpace;
CGContextSaveGState(myContext);// 6
myColorSpace = CGColorSpaceCreateDeviceRGB ();// 9
myColor = CGColorCreate (myColorSpace, myColorValues);// 10
CGContextSetShadowWithColor (myContext, myShadowOffset, spread, myColor);// 11
// Your drawing code here// 12
// CGContextDrawImage(myContext, rotatingView.frame,imgRef);
rotatingView.clipsToBounds = NO;
[rotatingView.image drawInRect:rotatingView.frame
blendMode:kCGBlendModeNormal alpha:.5];
CGColorRelease (myColor);// 13
CGColorSpaceRelease (myColorSpace); // 14
UIImage *imageCopy = UIGraphicsGetImageFromCurrentImageContext();
CGContextRestoreGState(myContext);
UIGraphicsEndImageContext();
rotatingView.image = imageCopy;_______________________________________________
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