Skip to content

Conversation

@thisIsTheFoxe
Copy link

Make sure hosting VC doesn't have a background color.
Still supports .background from the content view, but if no background is set, make sure it's transparent.
If the background is NOT set, the UIHostingController adds the default bg color for the current color scheme / appearance.

Example
struct ContentView: View {
    var body: some View {
        VStack {
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundStyle(.tint)
            Text("Hello, World!")
                .screenshotProtected(isProtected: true)
        }
        .padding()
        .background(Color.red)
    }
}

IMG_D50E121FE37E-1

Make sure hosting VC doesn't have a background color
Still supports `.background` from the `content` view, but if no background is set, make sure it's transparent.
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

Successfully merging this pull request may close these issues.

1 participant