When I use LongPressGesture
in NavigationLink
, the NavigationView
cannot pull down after the link is full of screen because the LongPressGesture
and NavigationView
's pulling down have conflicts.
The code is as following:
VStack{
HStack(alignment: .top) {
NavigationLink(destination: Group
{ if self.isLongPressed { Destination2() } else { Destination1() } }, tag: index, selection: self.$currentTag
) {
Text(self.lyrics[index])
}
}
}
.contentShape(Rectangle())
.simultaneousGesture(LongPressGesture().onEnded { _ in })
Using two fingers to drag down NavigationView
is also fine for me. But I do not know how to make it.
How to solve this bug and make pulling down NavigationView
work? Thanks for any help.