UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

NavigationSplitView

Forums > SwiftUI

Has anyone observed sheet appearance/dismissal animation issues when using NavSplitView and the sheet presentation is originated from the detail view?

2      

I have a TabView with 4 tabs. Each of them shows a NavigationSplitView and in some of them there are sheets opened from the detail view. The sheet animations look fine to me, but opening the sheet will SOMETIMES break the appearance of the TabBar.

Normal appearance: normal appearance

After opening the sheet: after opening the sheet The TabBars appearance will return to normal, when scrolling or interacting with the views.

2      

hi,

i've seen the code that OP Mark was using that generated his question about visual issues with NavigationSplitView, and it has something in common with the code from Loahrs: both use a TabView as a top-level container with one or more NavigationSplitViews as panes inside a TabView.

before NavigationSplitView, it was made pretty clear that, in iOS and SwiftUI, you could put a NavigationView inside a TabView, but not the other way around, as TabView was considered a top-level container.

now, with NavigationSplitView, i think it's likely the case that NavigationSplitView is assumed to itself be a top-level container, so it should not be placed inside, say, a TabView.

if so, this could explain some of the visual problems that Mark and Loahrs describe.

so i wonder if anyone can confirm this assertion:

a NavigationSplitView should not be placed inside a TabView

might someone have an answer? if so, maybe that will help,

DMG

3      

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!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

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.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.