|
I have developed an app which uses a TabView and a NavigationView. I want the tabs to disappear once you start navigating into other views. Despite what Paul Hudson says at the bottom of this article https://www.hackingwithswift.com/books/ios-swiftui/creating-tabs-with-tabview-and-tabitem#:~:text=Tip%3A%20It's%20common%20to%20want,than%20the%20other%20way%20around. the only way I could get this to work was to put the TabView inside the NavigationView. This has been working great in iOS 13, however the same code on iOS 14 doesn't behave well. Often times when you've nagivated deep into several views the navigation bar misbehaves and the back button can bring you back more than one view. Is there a recommended way in the latest SwiftUI and iOS 14 to have a TabView where the tab bar disappears after you start navigating into views? Thanks. |
|
i remind effectivly that you can do this before, but i think it´s not a good conception choice. I had to take same decision two months ago, and i chose to embed navigation view inside tabbar (the fact that you cannot do the reverse anymore seems to confirm my choice...) i think that the tabbar ux design is to allways stay on screen. Anyway if you really want to achive this i think that you will have to make your own custom tabbar... |
|
@linkiliz I am having hard times understanding how is it possible that I have to always mandadory show the tab bar. For example I have a tab bar with 4 items:
But logically when the user opens one quiz pack from the Quiz tab, he shouldn't be able to navigate into the Videocourse tab to watch the video with explanations. I don't know if I've explained well, buf If I did, how would you solve this situation? |
|
hi, this has come up before in the forums ... can't put my finger on the relevant references right now in previous posts, although i think
curiously, i know it was possible at one point in UIKit to hide or dismiss the tabbar when you segued to other views; i don't whether that's still a thing anymore. hope that helps, DMG |
|
Thanks By using Set up as Normal the Window Group as per Apple Human Face Guide Lines.
Then in the have your View that you want full screen (but not
Then in
When this is presented it a But it does fulfil HIG
So |
|
|
|
TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.