Skip to content

Views that contain a UIVisualEffectView with a glass effect are not properly recorded #1019

@donnywdavis

Description

@donnywdavis

Describe the bug
We have been updating for iOS 26 and have added a few UIVisualEffectViews with the glass effect to some elements. When re-recording the snapshots we noticed that the views are recorded as a solid dark grey or black color. Tinkering around it seems that this is related to the tint color on the visual effect view. If I remove the tint color, then the view is recorded correctly. It only seems to be an issue when adding a tint color.

private lazy var visualEffectView: UIVisualEffectView = {
    let visualEffectView = UIVisualEffectView()

    if #available(iOS 26, *) {
        let glassEffect = UIGlassEffect()
        glassEffect.tintColor = SystemColors.Surface.Neutral.default // this line causes the recording issue
        visualEffectView.effect = glassEffect
        visualEffectView.cornerConfiguration =
            .corners(radius: UICornerRadius(floatLiteral: Constants.cornerRadius))
    }

    visualEffectView.translatesAutoresizingMaskIntoConstraints = false
    return visualEffectView
}()

Screenshots

This is what is recorded when using a tint color on the visual effect view. The tint color used here was white. Image
Expected snapshot. This is recorded with the glass effect, but no tint color. I added a white background for the snapshot since the background is clear by default. Image

Environment

  • swift-snapshot-testing version 1.18.6
  • Xcode 26 RC
  • Swift 5.10
  • OS: iOS 26

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions