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

Hi Niccolò! #1

Open
Alex-Vaiman opened this issue Mar 9, 2024 · 2 comments
Open

Hi Niccolò! #1

Alex-Vaiman opened this issue Mar 9, 2024 · 2 comments
Assignees

Comments

@Alex-Vaiman
Copy link

Alex-Vaiman commented Mar 9, 2024

Grate project!
I found a small issue, all tabs screens are in safe area, and I cannot change this, for example the back ground color of the status bar in every screen. I am afraid the fix is going to be dangerous for current users?

private func bottomBarView(children: _VariadicView.Children) -> some View {
      VStack(spacing: 0) {
          contentView(children: children)
              .ignoresSafeArea(.container)
          
          tabBarView
      }
  }

if you add the .ignoresSafeArea(.container), the issue solved, but the we have 2 problems.
1 It supported since ios13, mac 11.
2 the other thing, depending on the setup, it may? brake thing for current users.

@Alex-Vaiman Alex-Vaiman changed the title Hi nic! Hi Nic! Mar 9, 2024
@Alex-Vaiman Alex-Vaiman changed the title Hi Nic! Hi Niccolò! Mar 9, 2024
@Alex-Vaiman
Copy link
Author

Alex-Vaiman commented Mar 9, 2024

Simulator Screenshot - iPhone 15 Pro - 2024-03-09 at 23 41 35

I mean the orange screen, it is not possible without this fix.

@NicFontana
Copy link
Owner

Hello Alex!

I have achieved the result you wanted by ignoring the safe area in CustomTabView and in the content of the first tab:

    var body: some View {
        CustomTabView(tabBarView: tabBarView, tabs: Tab.allCases, selection: selectedTab) {
            NavigationView {
                ZStack {
                    Color.orange
                    
                    Text("Profile")
                }
                .edgesIgnoringSafeArea(.all) // <--- Here
                .navigationBarTitle("Profile")
            }

            // Other tabs
        }
        .edgesIgnoringSafeArea(.vertical) // <--- Here
    }

Let me know if that works for you as well.

@NicFontana NicFontana self-assigned this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants