Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glur over UIViewController gives Yellow view with restriction sign #17

Open
dollar2048 opened this issue Dec 9, 2024 · 0 comments
Open

Comments

@dollar2048
Copy link

When I apply .glur(...) over the SwiftUI view which is UIViewControllerRepresentable it gives some Yellow view with a restriction sign:
image
The code:

import Glur
import SwiftUI

struct GlurView: View {
    var body: some View {
        VCRepresentable()
            .glur(radius: 15, offset: 0.5, interpolation: 0.6, direction: .down)
    }
}

struct VCRepresentable: UIViewControllerRepresentable {
    func makeUIViewController(context: Context) -> UIViewController {
        let vc = UIViewController()
        vc.view.backgroundColor = .red
        return vc
    }

    func updateUIViewController(_ uiView: UIViewController, context: Context) {}
}

#Preview {
    GlurView()
}

What could be the reason? I would appreciate any hint.

Ultimately, I need UIViewController to present AVPlayerViewController with some Player inside.
Or do you have any idea how to implement that blur effect, like in this GitHub repository (without any frosty material background), over the video player?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant