Re: Box soft shadow?
Thank you. On Mon, Aug 23, 2010 at 10:26 AM, Conrad Shultz < con...@synthetiqsolutions.com> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 8/23/10 7:02 AM, Eric E. Dolecki wrote: > > I was asked to provide a soft drop shadow for a custom UIView class... > and > > basically I am looking to create a soft shadow beneath a square opaque > > element. I'd like to do this without using a PNG. How would I do this? I > am > > googling, and found something for text, but not just for a simple square > > shape. > > > > If I understand what you are asking for, look at the CALayer methods: > > setShadowOpacity: > setShadowOffset: > setShadowColor: > > And note that you can call these on the UIView's layer, e.g. > > [[myView layer] setShadowOpacity:0.5]; > > (Note that you will need to have imported QuartzCore to get access to > this functionality.) > > > - -- > Conrad Shultz > > Synthetiq Solutions > www.synthetiqsolutions.com > -BEGIN PGP SIGNATURE- > Version: GnuPG/MacGPG2 v2.0.14 (Darwin) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkxyhSAACgkQaOlrz5+0JdVRuACfamGbna7eMxp0d7eGRBMsV/HD > bOYAnikmIP7gOh5mKFJ+/JsVcV2oN/o0 > =TWEn > -END PGP SIGNATURE- > -- Interactive Designer and Developer Google Voice: (508) 656-0622 http://blog.ericd.net ___ 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
Re: Box soft shadow?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/23/10 7:02 AM, Eric E. Dolecki wrote: > I was asked to provide a soft drop shadow for a custom UIView class... and > basically I am looking to create a soft shadow beneath a square opaque > element. I'd like to do this without using a PNG. How would I do this? I am > googling, and found something for text, but not just for a simple square > shape. > If I understand what you are asking for, look at the CALayer methods: setShadowOpacity: setShadowOffset: setShadowColor: And note that you can call these on the UIView's layer, e.g. [[myView layer] setShadowOpacity:0.5]; (Note that you will need to have imported QuartzCore to get access to this functionality.) - -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxyhSAACgkQaOlrz5+0JdVRuACfamGbna7eMxp0d7eGRBMsV/HD bOYAnikmIP7gOh5mKFJ+/JsVcV2oN/o0 =TWEn -END PGP SIGNATURE- ___ 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
Re: Box soft shadow?
On Aug 23, 2010, at 9:02 AM, Eric E. Dolecki wrote: > I was asked to provide a soft drop shadow for a custom UIView class... and > basically I am looking to create a soft shadow beneath a square opaque > element. I'd like to do this without using a PNG. How would I do this? I am > googling, and found something for text, but not just for a simple square > shape. Draw with CGContextShadow set appropriately, or set the shadow property of the CALayer of the UIView (if you are requiring iOS 3.2 or later) Glenn Andreas gandr...@gandreas.com The most merciful thing in the world ... is the inability of the human mind to correlate all its contents - HPL ___ 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
Box soft shadow?
I was asked to provide a soft drop shadow for a custom UIView class... and basically I am looking to create a soft shadow beneath a square opaque element. I'd like to do this without using a PNG. How would I do this? I am googling, and found something for text, but not just for a simple square shape. -- Interactive Designer and Developer Google Voice: (508) 656-0622 http://blog.ericd.net ___ 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