SwiftUI on iPad: Organize your interface

RSS for tag

Discuss the WWDC22 Session SwiftUI on iPad: Organize your interface

Posts under wwdc2022-10058 tag

4 Posts

Post

Replies

Boosts

Views

Activity

Handling single selection action in multi-selection SwiftUI Table
I have a SwiftUI Table on iPadOS that supports multiple selection and contains rows representing documents that can be opened. I want to be able to select multiple rows from edit mode or with keyboard modifiers for batch operations, but a regular tap on a single item should open it and push it onto the navigation stack. Rows are highlighted when I tap on them, but the table's selection isn't modified and I can't figure out how to respond to that action. There's nowhere for me to put a NavigationLink because I'm only providing views for each column and not for the row itself. I could also push onto the navigation stack manually if I could respond to the action, but I don't see any API for doing so. I've tried using .onChange(of: selection) and checking that the selection only contains a single element, but single taps on rows don't modify the selection, and even if they did, this logic would trigger incorrectly when adding the first item to the selection in edit mode for example. Is there something I'm overlooking, or is this not possible with SwiftUI tables currently?
2
0
1.8k
Aug ’22
Changing the images and tint of the icons provided by NavigationSplitView
Hey All, I'm currently implementing the new NavigationSplitView to improve my app's iPad experience, but I noticed that I couldn't seem to be able to tint the icons provided to toggle the Sidebar and the overflow menu. If I can't change the tint of these icons, I'm afraid I have to fall back the old implementation. The same counts for the Customize toolbar view. (I would also love to be able to change that background for legibility)
2
0
1.6k
Aug ’22
.onContinueUserActivity not calling in case of deep linking(iOS 14).
After implementation of deep linking and when we click link in notes or email then it should call .onContinueUserActivity in Swiftui. But it's not happening. Can someone help me, how to do it.
Replies
1
Boosts
0
Views
906
Activity
Feb ’24
Handling single selection action in multi-selection SwiftUI Table
I have a SwiftUI Table on iPadOS that supports multiple selection and contains rows representing documents that can be opened. I want to be able to select multiple rows from edit mode or with keyboard modifiers for batch operations, but a regular tap on a single item should open it and push it onto the navigation stack. Rows are highlighted when I tap on them, but the table's selection isn't modified and I can't figure out how to respond to that action. There's nowhere for me to put a NavigationLink because I'm only providing views for each column and not for the row itself. I could also push onto the navigation stack manually if I could respond to the action, but I don't see any API for doing so. I've tried using .onChange(of: selection) and checking that the selection only contains a single element, but single taps on rows don't modify the selection, and even if they did, this logic would trigger incorrectly when adding the first item to the selection in edit mode for example. Is there something I'm overlooking, or is this not possible with SwiftUI tables currently?
Replies
2
Boosts
0
Views
1.8k
Activity
Aug ’22
Changing the images and tint of the icons provided by NavigationSplitView
Hey All, I'm currently implementing the new NavigationSplitView to improve my app's iPad experience, but I noticed that I couldn't seem to be able to tint the icons provided to toggle the Sidebar and the overflow menu. If I can't change the tint of these icons, I'm afraid I have to fall back the old implementation. The same counts for the Customize toolbar view. (I would also love to be able to change that background for legibility)
Replies
2
Boosts
0
Views
1.6k
Activity
Aug ’22
List-like Selection for custom containers
The new contextMenu(forSelectionType:menu:) implementation is pretty nifty, but as far as I can tell the only views that support it are List and Table. I was wondering if it's possible to support this new behavior with a custom container, and if so -- how?
Replies
2
Boosts
0
Views
824
Activity
Jun ’22