Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tab bar placment #83

Open
Skovie opened this issue Apr 20, 2022 · 1 comment
Open

tab bar placment #83

Skovie opened this issue Apr 20, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Skovie
Copy link

Skovie commented Apr 20, 2022

Hey

Is it in any way possible to ad a placement of the tab bar, so I can put it below in sted ?

Skærmbillede 2022-04-20 kl  23 37 12

@eduserve
Copy link

eduserve commented Mar 4, 2023

I did a hard code (proof of concept) work around. This work around applies when style.placedInToolbar is false. I suppose another style (that is, the PagerStyle protocol) could be added to determine if the content should be above or below the NavBarWrapperView(selection:).

In the file NavBarModifier, switch lines 19 and 20 so that they read (in context starting on line 17).

@MainActor func body(content: Content) -> some View {
        VStack(alignment: .leading, spacing: 0) {
            if !style.placedInToolbar {
                content
                NavBarWrapperView(selection: $selection)
            } else {
                content.toolbar(content: {
                    ToolbarItem(placement: .principal) {
                        NavBarWrapperView(selection: $selection)
                    }
                })
            }
        }
    }

@cecipirotto cecipirotto added the enhancement New feature or request label Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants