If anyone has noticed odd tab bar behaviour in @chronicling on iPad, this seems to be a regression in #SwiftUI since 18.4, also seen in the Apple Landmarks tutorial app. I've filed a feedback - also discussed by others here https://developer.apple.com/forums//thread/759875?answerId=841213022#841213022
Combining NavigationSplitView and … | Apple Developer Forums

@beccaowen @chronicling Wow that’s ridiculous. It seriously feels like Apple has removed all of their tests and tells everyone to just not worry about fixing it.

@beccaowen @chronicling

From my understanding from conversations with Apple engineers here, these components are not intended to be used simultaneously.

Check this thread with @curtclifton and @teissler, you’ll probably find relevant information and details about the use of a NavigationSplitView and a TabBar: https://hachyderm.io/@teissler/113963562281613335

Nick (@[email protected])

@[email protected] @[email protected] @[email protected] one of my favorite compact/regular design tradeoffs is seen in passwords and mail. each app has their search bar in a certain column. content column in regular, but sidebar column in compact for passwords only. API to configure this would've been silly and likely confusing. So the teams had to build the views more manually.

Hachyderm.io

@alpennec thanks for pointing it out :( it's just a bit disappointing when I've used it this way since iOS 16, I'm not aware of any documentation advising against it and it is used this way in Apple's own tutorials.

I see the point that they both provide a sidebar. I was hoping TabSections would help but for my use case I can't do enough with them.

@beccaowen I think it's fine for iOS 16 and iOS 17 and it's the new iOS 18 layout that changed a bit how we should use both components in our apps (even though Apple is using this layout in the Music app for example).

Have you seen Apple's tutorial mixing both in iOS 18?

@alpennec what is odd is it was briefly broken and fixed in the iOS18 beta, so I thought it was going to be OK!

NavigationSplitView is used within a TabView in this SwiftUI tutorial, although not explicitly iOS18 https://developer.apple.com/tutorials/swiftui/composing-complex-interfaces

Composing complex interfaces | Apple Developer Documentation

The category view for Landmarks shows a vertically scrolling list of horizontally scrolling landmarks. As you build this view and connect it to your existing views, you’ll explore how composed views can adapt to different device sizes and orientations.

Apple Developer Documentation

@beccaowen yep, and it's iOS, not iPadOS.

I couldn't find the answer to how best support iOS and iPadOS with conditional code to separate both layouts.

https://iosdev.space/@alpennec/113465351629334279

Axel Le Pennec (@[email protected])

@[email protected] cc @[email protected] This kind of UI works correctly on iOS. This would mean I should use a NavigationSplitView for iPadOS (where the sidebar acts as the new TabView sidebar) but a TabView + NavigationStack on iOS? Meaning I lose the benefit of a single component to build cross-platform apps. Even though I thought we had to use horizontal size classes, should I instead use UIDevice.current.userInterfaceIdiom == .pad & .phone? Maybe I’m missing something 🤔

iOS Dev Space