I want to do two things. Firstly, I want to navigate to SpaceView if I tap on 'TileCell'.
NavigationLink(destination: SpaceView(space: space)) {
TileCell(
image: image,
text: space.name!,
detailText: nil,
isFaded: space.isComplete
)
}
.buttonStyle(PlainButtonStyle())
}
This works great.
But I also want to long press on TileCell to trigger a different action.
NavigationLink(destination: SpaceView(space: space)) {
TileCell(
image: image,
text: space.name!,
detailText: nil,
isFaded: space.isComplete
)
.onLongPressGesture {
action()
}
}
.buttonStyle(PlainButtonStyle())
}
The long-press gesture works, but I can no longer navigate to SpaceView by tapping.
Any help getting both to work would be appreciated.