Created
April 24, 2025 17:41
-
-
Save ajjames/eaadd756836fb7d7a80184f9c9c55500 to your computer and use it in GitHub Desktop.
Remove background from sheets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
/// Usage: | |
/// .fullScreenOverlay(isPresented: $showAttachmentsMenu) { | |
/// SomeView() | |
/// .background(BackgroundClearView()) | |
/// } | |
struct BackgroundClearView: UIViewRepresentable { | |
func makeUIView(context: Context) -> UIView { | |
let view = UIView() | |
DispatchQueue.main.async { | |
view.superview?.superview?.backgroundColor = .clear | |
} | |
return view | |
} | |
func updateUIView(_ uiView: UIView, context: Context) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment