Curved Drop Shadows in Core Graphics
Earlier this week Sebastiaan de With posted a really nicely done iLife UI Roundup in which he use a cool curved drop shadow on his images. Soon after that Gus Mueller released a nice Acorn Curved Drop Shadow Filter that really worked flawlessly recreating this effect.
Last evening I was working on some new image effects in my new iPhone application (details coming soon) and decided to try to implement this effect for use on the iPhone using Core Graphics. I used the python code from Gus as a foundation and converted it to a Core Graphics effects class which I’m calling WAImageDropShadowEffect. This class can be generically reused on the iPhone to recreate this effect for any image by using this effect class to draw from your UIView.
Below is a picture of the sample application I put together showing off this new effect:
I’m hoping Gus and Sebastiaan don’t mind the reuse, I’ve made sure to attribute them in the sample.
The license is pretty much wide open so long as you retain the disclaimer. You can download this code from our open source section or via subversion here:
svn co http://svn.wideasleep.com/public/trunk/







iPhoneKicks.com on 13 Jan 2009 at 12:35 pm
Class: WAImageDropShadowEffect at Under The Bridge on 19 Jan 2009 at 11:35 pm