Post

Replies

Boosts

Views

Activity

Reply to Validate drag operations with Transferable
Thanks for your response! This depends on the context of the drop. For example, a dropDestination(for:action:) on a Table row would provide you the offset relative to the view’s underlying collection of data and you could use that to determine the appropriate index. I actually meant the functionality of -[NSOutlineView setDropItem:dropChildIndex:] where I can re-target the drop to another list item or making an ordered insertion to an unordered insertion. This is currently not supported with Transferable. Okay, thanks – I'll file a feedback. I wonder about the best workaround. Using onMove is not an option, because I want to be able to move items across multiple windows. Also it doesn't support move across List sections. The only option I see is to use onDrop and changing the drop icon using the DropDelegate. But it seems this won't display the blue drop indicator on macOS (while dropDestination does this).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’25
Reply to CKSyncEngine and desiredKeys
Thanks! I've filed it (FB15526915). I wonder what a good workaround could be: For now I think one could store the actual asset into a separate record so it won't be notified if other properties change. Do you see any other workarounds?
Replies
Boosts
Views
Activity
Nov ’24
Reply to Validate drag operations with Transferable
Thanks for your response! This depends on the context of the drop. For example, a dropDestination(for:action:) on a Table row would provide you the offset relative to the view’s underlying collection of data and you could use that to determine the appropriate index. I actually meant the functionality of -[NSOutlineView setDropItem:dropChildIndex:] where I can re-target the drop to another list item or making an ordered insertion to an unordered insertion. This is currently not supported with Transferable. Okay, thanks – I'll file a feedback. I wonder about the best workaround. Using onMove is not an option, because I want to be able to move items across multiple windows. Also it doesn't support move across List sections. The only option I see is to use onDrop and changing the drop icon using the DropDelegate. But it seems this won't display the blue drop indicator on macOS (while dropDestination does this).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Validate drag operations with Transferable
Okay, thanks for pointing out! But in this case I would have to use custom UI for drawing the indicator? It's not possible to trigger the standard indicators of macOS?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to DynamicViewContent and drop validation (macOS)
Thanks for getting back! But this way I still can't validate the drop? For instance, I can't say that it is not allowed to drop something on Index 0? (E.g. to forbid moving something between some built-in items in the sidebar of my app)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’26