Tell me the best way to define such a shadow over UIView (only from one side - from the top):

enter image description here

    1 answer 1

    testView.layer.shadowColor = UIColor.black.cgColor testView.layer.shadowOffset = CGSize(width: 0.0, height: -2.0) testView.layer.shadowRadius = 3.0 testView.layer.shadowOpacity = 0.08 testView.layer.masksToBounds = false 

    enter image description here