I have an UITextView
with a "dropshadow" and a tableView
below it. The problem that I can't figure out is how to make the "dropshadow" transparent so that tableView
and details below can be seen through the shadow (see image below). I tried playing with the opacity and radius but it's not working.
Here is my code to create the drop shadow:
postDetails.layer.shadowColor = [[UIColor blackColor] CGColor];
postDetails.layer.shadowOffset = CGSizeMake(0.0f, 3.0f);
postDetails.layer.shadowRadius = 3.0f;
postDetails.layer.shadowOpacity = 0.3f;
postDetails.layer.masksToBounds = NO;
EDIT: I think what is also contributing to the issue is the the layout. it is:
- UIView (superview)
- UITextview (subview of UIView)
- UITableView (subview of UIView)
The text should be able to be seen through the shadow for a cleaner look.