• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Please if some one knows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Please if some one knows
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Outline View Enter Edit Mode.
  • Next by Date: Re: Please if some one knows
  • Previous by thread: Re: Simple question on Menus and Document-based apps
  • Next by thread: Re: Please if some one knows
  • Index(es):
    • Date
    • Thread