Skip to content

UIVisualEffectView inexplicably hidden #3

@jadar

Description

@jadar

It seems like UIVisualEffectView is getting hidden in the updateUIView function. The guarded unwrap of context.environment.visualEffect fails and causes the uiView to get hidden. However, the visualEffect environment property is set on the VisualEffectView struct and thus also the environment. Could this be a SwiftUI bug? I'm new enough to SwiftUI that I'm not quite certain how all the environment stuff works. Is there a particular reason that you want to use the environment version versus the actual value on the struct?

With the hidden line as written:
Screen Shot 2020-02-01 at 1 43 20 PM

With the hidden line commented out:
Screen Shot 2020-02-01 at 1 43 26 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions