rundfunk47 / stinsen

Coordinators in SwiftUI. Simple, powerful and elegant.
MIT License
923 stars 98 forks source link

[question] TabBar Button tap gesture #73

Closed okstring closed 2 years ago

okstring commented 2 years ago

Hello, thank you for providing a good coordinator pattern library.

We tried to make the TabBar Button move to the corresponding tabView root when pressed, and move to the top of the scrollView when clicked again, but we found that tapGesture does not work for the TabBar Button provided by stinsen.

@ViewBuilder func makeFirstTab(isActive: Bool) -> some View {
    VStack {
        Image("icon")
        Text("TabItem")
    }
    .onTapGesture {
        // Not working
    }
}

I'm looking for a way other than how to create a Custom TabBar to save resources and I was wondering if there is a better way inside the library?

Thanks

LePips commented 2 years ago

Completed in https://github.com/rundfunk47/stinsen/pull/77.

rundfunk47 commented 2 years ago

Closing this issue some it's fixed 🙂 Please comment if you have further questions or ideas!

emartinson commented 2 years ago

Hi, @rundfunk47 thank you for this PR. I'm wondering if anything changes since https://github.com/rundfunk47/stinsen/pull/77 ? I can't find onTapped in Stinsen.

Was it renamed or removed?

rundfunk47 commented 2 years ago

We haven't had a proper release since this was merged, try the master branch?