Trying to make a sheet-like view that attaches at the bottom to another view so I'd like to have only the top two corners rounded.
This works for a blurred effect:
let glassView = UIVisualEffectView(effect: UIBlurEffect(style: .systemMaterial))
glassView.layer.cornerRadius = 20
glassView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]
glassView.layer.masksToBounds = true
but if I try to use the iOS 26 UIGlassEffect, all 4 corners become rounded:
let glassView = UIVisualEffectView(effect: UIGlassEffect())
glassView.layer.cornerRadius = 20
glassView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]
glassView.layer.masksToBounds = true