Dynamic change of interactivity is not supported?
pvl2061 opened this issue · comments
Pavlo commented
My code is:
@State var enableInteractivity = false
NavigationStack(path: $stack) {
...
}
.navigationTransition(.default, interactivity: enableInteractivity ? .edgePan : .disabled)
I change enableInteractivity
flag in the onAppear { }
of views in the NavigationStack, however, it doesn't work on iOS 16 and iOS 17 - the initial value of enableInteractivity
is always used.
Pavlo commented
Oh, I realized that simply changing the flag in onAppear { } is wrong because it's called during the back transition too. No issue in the library, sorry.