nathantannar4 / Transmission

Bridges UIKit presentation APIs to a SwiftUI API so you can use presentation controllers, interactive transitions and more.
BSD 2-Clause "Simplified" License
378 stars 13 forks source link

Clear backgrounded presentation has non-clear background after animation #18

Closed PhilipDukhov closed 9 months ago

PhilipDukhov commented 9 months ago

In 0.1.27 this code works fine, but in **1.*** it adds background after transition finishes. Without .animation it works fine too.

@State var isPresented = false

var body: some View {
    Button {
        isPresented = true
    } label: {
        Text("show")
    }
    .presentation(
        transition: .slide(
            options: .init(
                edge: .bottom,
                prefersScaleEffect: true,
                isInteractive: true,
                options: .init(
                    shouldAutomaticallyDismissDestination: false,
                    modalPresentationCapturesStatusBarAppearance: true,
                    preferredPresentationBackgroundColor: .clear
                )
            )
        ),
        isPresented: $isPresented
    ) {
        Text("hey").foregroundStyle(.gray)
    }
    .animation(.default, value: isPresented)
}

https://github.com/nathantannar4/Transmission/assets/6103621/3e3bdb5b-c917-4194-8a8e-e0e7e39b290e

nathantannar4 commented 9 months ago

Fixed in 1.0.2