Hi,
I'm having a hard time trying to solve this impossibly small problem in SwiftUI. I have a list like this:
struct ContentView: View { var body: some View { List { Button(action: { print("hello") }, label: { Text("Hello") }) } } }
And every time I tap on it, the row deselect without animation, but I want the same effect as UITableView.deselectRow(at:animated:)
. Why is this so hard or am I missing something?
I don't want to use NavigationLink
because I only want to execute code upon tap, not navigating to other view, unless it's possible to only execute code using NavigationLink
...
Thanks,