iOS 26 UIGlassEffect: Corner edge lighting disappears on a rounded rect, but works perfectly on a circle/pill shape. Why?

2 weeks ago 10
ARTICLE AD BOX

I'm currently playing around with the new UIGlassEffect in iOS 26, and I've run into a weird visual rendering issue with corners.

The Problem: I'm building a custom dropdown menu (VSCaptureModeDropdownView) with a fixed corner radius (34). However, the specular highlights and edge lighting on the corners seem to break or disappear entirely. Instead of a rich 3D glass edge, it just looks like a cheap, flat 1px border (see attached image).

error liquid glass effect

Code 1: The Broken Setup (Rounded Rectangle)

Swift

private func setupBackground() { if #available(iOS 26.0, *) { let glassEffect = UIGlassEffect() glassEffect.isInteractive = true // To match a dark design, I used a black tint with 0.8 alpha glassEffect.tintColor = .black.withAlphaComponent(0.8) let effectView = UIVisualEffectView(effect: glassEffect) effectView.autoresizingMask = [.flexibleWidth, .flexibleHeight] effectView.clipsToBounds = true addSubview(effectView) self.visualEffectView = effectView } } override func layoutSubviews() { super.layoutSubviews() visualEffectView?.frame = bounds // Setting a fixed corner radius breaks the edge lighting visualEffectView?.layer.cornerRadius = 34 }

Code 2: The Working Setup (Circle / Pill Shape) Interestingly, I have another component (VSGlassIndicatorView) that uses almost the exact same setup, but it works perfectly and keeps the nice glass edges.

enter image description here

The only major difference is that it's a perfect circle/pill shape where the corner radius is calculated dynamically:

private func setupIfNeeded() { guard #available(iOS 26.0, *) else { return } let glassEffect = UIGlassEffect() glassEffect.isInteractive = true let effectView = UIVisualEffectView(effect: glassEffect) effectView.autoresizingMask = [.flexibleWidth, .flexibleHeight] effectView.clipsToBounds = true addSubview(effectView) visualEffectView = effectView } public override func layoutSubviews() { super.layoutSubviews() visualEffectView?.frame = bounds // This renders the glass effect perfectly visualEffectView?.layer.cornerRadius = min(bounds.width, bounds.height) / 2 }

My Question: Why does the glass effect lose its edge lighting on a standard rounded rectangle (cornerRadius = 34), but work perfectly on a capsule/circle shape? Has anyone else encountered this issue, and is there a proper way to fix it so the fixed rounded rectangle keeps its 3D glass edge?

Thanks in advance!

Read Entire Article