UIView with rounded corners and drop shadow?

Swift // corner radius blueView.layer.cornerRadius = 10 // border blueView.layer.borderWidth = 1.0 blueView.layer.borderColor = UIColor.black.cgColor // shadow blueView.layer.shadowColor = UIColor.black.cgColor blueView.layer.shadowOffset = CGSize(width: 3, height: 3) blueView.layer.shadowOpacity = 0.7 blueView.layer.shadowRadius = 4.0 Exploring the options Problem 1: Shadow gets clipped off What if there are sublayers or subviews (like an image) whose content we want … Read more