I am trying to add a shadow to all four sides of a imageView. I see that: self.shadowView.layer.shadowOffset = CGSizeMake(10, 20); put a shadow on two sides. How do I put a shadow on all four sides?
Just set shadowOffset
to (0,0) or something close. Adjust shadowRadius
if you want the shadow to be bigger. The default is 3 but you may have to increase it. You also may want to play with shadowOpacity
to determine the visibility of the shadow.
_yourImageView.layer.shadowRadius = 10.0;
This line plays the game. Try increasing your shadowRadius
. Thus you will get the shadow on all 4 sides.
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