Possible Duplicate:
How to use Quartz 2D to add drop shadow to an UIImage or UIImageView ?
Hi,
I have created a tableViewController and want to try to add the shadow effect for both the navigation bar as well as the table cells. Can anyone guide me on the approach to do so?
Thanks!
Zhen Hoe
try this
yourView.layer.shadowColor = [[UIColor blackColor] CGColor];
yourView.layer.shadowOffset = CGSizeMake(1.0f, 1.0f);
yourView.layer.shadowRadius = 3.0f;
yourView.layer.shadowOpacity = 1.0f;
You'll need to replace "yourView" with nav bar or table cell
Btw, also you'll need import QuartzCore/CALayer.h
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With