Add shading to clipped UIView

Posted by huggie on Stack Overflow See other posts from Stack Overflow or by huggie
Published on 2010-06-06T10:47:33Z Indexed on 2010/06/06 10:52 UTC
Read the original article Hit count: 320

I'm creating an iphone application. I have this UIView whose content is clipped with a path. I want to add shading and/or shadow to it. What's the best way to do this? For shadow, I tried CGContextSetShadow() but it doesn't seem to have an effect (perhaps it's drawing outside the shown region?) . How about shading? I want it to appear along the path. What's the best way to go about it? Is it to create another narrow clip strip along the original clipping path (if it's possible to have two clip path... ) Or does this need to be done in another CALayer? I am not even sure what that is yet.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c