I am trying to apply mask to UIVisualEffectView
to make bottom corners rounded, but for some reason i have an error "Type of expression is ambiguous without more context" in here ".BottomRight | .BottomLeft"
and the second problem is if i make only one rounded corner then UIVisualEffectView
constraines goes wrong
@IBOutlet weak var visualEffect: UIVisualEffectView!
override func awakeFromNib() {
super.awakeFromNib()
let rectShape = CAShapeLayer()
rectShape.bounds = self.visualEffect.frame
rectShape.position = self.visualEffect.center
rectShape.path = UIBezierPath(roundedRect: self.visualEffect.bounds, byRoundingCorners: .BottomRight | .BottomLeft, cornerRadii: CGSize(width: 10, height: 10)).CGPath
self.visualEffect.layer.mask = rectShape
}
How it is possible to fix this issues? Thanks