In the image below, I have two types of drop shadows.
In swift, I've used this function:
func applyShadow(view: UIView){
view.layer.shadowColor = UIColor.blackColor().CGColor
view.layer.shadowOffset = CGSizeMake(0, 1)
view.layer.shadowOpacity = 0.5
view.layer.shadowRadius = 10.0
view.clipsToBounds = false
view.layer.masksToBounds = false
}
to apply the shadow to the image in the image view.
How can I modify the applyShadow function to make the iOS drop-shadow match the effect of the web one?
I'm using .png files, but if I had to convert the file format, It wouldn't be too much more work.