I have designed UI elements in sketch, and one of them has a shadow with blur 1 and spread 0. I looked at the doc for the views layer property and layer doesnt have anything
This code worked very well for me:
yourView.layer.shadowOpacity = 0.2 // opacity, 20% yourView.layer.shadowColor = UIColor.black.cgColor yourView.layer.shadowRadius = 2 // HALF of blur yourView.layer.shadowOffset = CGSize(width: 0, height: 2) // Spread x, y yourView.layer.masksToBounds = false