Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/happymaa/public_html/coderchrismills.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340
July 2011 – Chris Mills Press "Enter" to skip to content

Month: July 2011

UIView Drop Shadow with Rounded Corners

Looking up a completely separate problem, I was running across a considerable amount of people asking how to apply a drop shadow to a UIView or how to round the corners. I previously did a post on something similar, but I wanted to take the time and build a small demo that shows how to accomplish both these things in a very easy way. Essentially we’re going to use the CALayer in the UIView to do all the work for us and not even bother with renderInContext:UIGraphicsGetCurrentContext(). Suppose we have a view we want to round and apply a drop shadow to…