I am trying to display a UIView with round corners and with a drop shadow. But the problem is that maskToBounds property only works for either of the case.
If maskT
You can do it with a single view by applying following:
1. Firstly add a corner radius
yourview.layer.cornerRadius = 5.0
2. Call a function below
shadowToView(view : yourview)
func shadowToView(view : UIView){
view.layer.shadowOffset = CGSize(width: 0, height: 3)
view.layer.shadowOpacity = 0.6
view.layer.shadowRadius = 3.0
view.layer.shadowColor = UIColor.darkGray.cgColor
}