How I can make custom overlay over List row that will highlight it on tap. I am using NaviagationLink and I've changed
UITableViewCell.appearance().cellSelectionStyle = .none
in order to not use default gray selection.
I've tried to add some @State isSelected
to my Cell but I do not know how/when to change this to get this affect. I've tried to add onTapGesture()
but it prevents NavigationLink, and doesn't provide begin, ended states, just ended.
Ok, here is very simple demo of the approach. The idea is to keep NavigationLink out of List and activate it manually on row tap (which becomes easily tappable w/o navigation link inside)... everything else, like animations, effects, and kind of highlight is up to you.
I do it this way:
And
ButtonStyle
: