We are trying to write an iOS app that supports regular and constrained widths using a TabView with .tabViewStyle(.sidebarAdaptable). On the surface this seems like a great way to write an app that supports all the different widths that your app may run in. Especially since Stage Manager and Apple Vision have made it easy for users to resize your apps window while it is running.
We are facing many challenges though. I will give a brief one liner of each below, but to truly experience them you need to run the sample app, or watch the sample videos included.
Issues
Basic TabView Issues
Double Navigation Bar: When tabs are collapsed into a "More" tab, there's an unwanted double navigation bar
Selection Sync: Tab selection gets out of sync when switching between narrow/wide layouts through the "More" tab
TabView Crash
Fatal crash occurs when resizing window to narrow width while Tab 5 is selected
Error: SwiftUI/SidebarAdaptableTabViewStyle_iOS.swift:482: Fatal error: Tried to update with invalid selection value
Section Handling Issues
Section Display Bug: Bottom tabs incorrectly show section names instead of tab names in narrow width
Tab Selection Mismatch: Tab identifiers don't match selected tabs in narrow width mode
Customization Issues
Inconsistent "Edit" button behavior in More tab
Unable to properly disable tab customization
Sample app and video
https://github.com/copia-wealth-studios/swiftui-tabview-sample
Post
Replies
Boosts
Views
Activity
I'd like to provide the ability for users to pinch/zoom on a SwiftUI ScrollView for my custom content (it's a tree of nodes). Think like maps allows you to pinch and zoom in one gesture, where as you pan the content stays under your fingers, keeping you connected to it. This gesture feels so natural that when it's different it feels completely broken. Unfortunately I haven't found a way to provide this experience in SwiftUI.
We have MagnificationGesture but this doesn't supply translation information. Combining a DragGesture doesn't work either. If we had a single gesture that provided magnification and translation information then I think we could accomplish the behaviour users expect.
There is a related post from last year here
Has anyone found a way to accomplish this? I have also filed a radar if anyone wants to dupe:
FB9162379
http://www.openradar.me/radar?id=4950743358373888
I created a brand new swift package, added a simple SwiftUI view, and opened the canvas to view the preview. This all worked great. Then I added a dependency to my package. After adding the dependency previews stop working. Here is my final Package.swift
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
		name: "MyTestPackage",
		platforms: [
				.iOS(.v14),
				.macOS(.v10_15)
		],
		products: [
				// Products define the executables and libraries a package produces, and make them visible to other packages.
				.library(
						name: "MyTestPackage",
						targets: ["MyTestPackage"]),
		],
		dependencies: [
				.package(url: "https://github.com/pointfreeco/swift-composable-architecture", from: "0.6.0")
		],
		targets: [
				// Targets are the basic building blocks of a package. A target can define a module or a test suite.
				// Targets can depend on other targets in this package, and on products in packages this package depends on.
				.target(
						name: "MyTestPackage",
						dependencies: [
								.product(name: "ComposableArchitecture", package: "swift-composable-architecture")
						]),
				.testTarget(
						name: "MyTestPackageTests",
						dependencies: ["MyTestPackage"]),
		]
)
The app compiles successfully via ⌘B, but the preview fails with the following error.
build aborted due to an internal error: planningFailed("multiple configured targets of \'ComposableArchitecture\' are being created for iOS Simulator")
SchemeBuildError: Failed to build the scheme "MyTestPackage"
unexpected service error: build aborted due to an internal error: planningFailed("multiple configured targets of \'ComposableArchitecture\' are being created for iOS Simulator")
Build system information:
error: unexpected service error: build aborted due to an internal error: planningFailed("multiple configured targets of \'ComposableArchitecture\' are being created for iOS Simulator")
I have an iPad app that I would like to convert from a tab bar to the new side bar when in regular width environments. My issue is that depending on the selection of the tab I sometimes need a second level of navigation, similar to the tripleColumn setting. Today I am achieving this by putting UISplitViewController's inside my UITabBarController. Can I achieve similar results with the new sidebar APIs?