Adding shadow on all four sides of UIImage iOS 6.0

I am trying to add a shadow to all four sides of the image. I see this: self.shadowView.layer.shadowOffset = CGSizeMake (10, 20); place the shadow on both sides. How to put a shadow on all four sides?

+8
ios shadow
source share
2 answers

Just set shadowOffset to (0,0) or something close. Adjust shadowRadius if you want the shadow to be larger. The default is 3, but you may have to increase it. You can also play with shadowOpacity to determine the visibility of the shadow.

+19
source share
 _yourImageView.layer.shadowRadius = 10.0; 

This line plays the game. Try to increase shadowRadius . Thus, you will get a shadow on all 4 sides.

+3
source share

All Articles