Post

Replies

Boosts

Views

Activity

UISplitViewController support for switching between tripleColumn and doubleColumn modes
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?
1
0
703
Jul ’20
Xcode previews stop working in packages after adding a dependency
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")
3
0
3.1k
Jul ’20
Is there a way to provide the traditional pinch and zoom behaviour in pure SwiftUI
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
1
0
846
Jun ’21