As I can see, right now window is presented with or without animation depending on context isAnimated value, and controlled by transition, but we would like to change animation curve to make it bouncier, do you think it's possible?
@State var isWindowPresented = false
var body: some View {
Button("Show toast") {
/// transition animation is expected to be customizable, but this parameter is ignored
withAnimation(.linear(duration: 5)) {
isWindowPresented.toggle()
}
}
.window(
transition: .move(edge: .top).combined(with: .opacity),
isPresented: $isWindowPresented
) {
Text("Toast")
}
}
As I can see, right now window is presented with or without animation depending on context
isAnimated
value, and controlled bytransition
, but we would like to change animation curve to make it bouncier, do you think it's possible?https://github.com/nathantannar4/Transmission/blob/6b3e6b46f34d0d18715d27c46e0053f1eda1bcd1/Sources/Transmission/Sources/Extensions/UIWindow%2BExtensions.swift#L10-L32
Sample code: