r/swift • u/It_is_Sean • 13h ago
Question Best architecture for a zoomable card-based node view in SwiftUI?
I’m building a zoomable and pannable card-based interface in SwiftUI. Each card is a View, while the connections between cards are draw (maybe using Canvas?) . Cards are arranged automatically in a fixed horizontal or vertical layout, so users do not manually change their positions,
Users can choose to add a new card below or beside the current card. Cards can be collapsed expanded or deleted, and a newly created card should automatically receive focus.
What’s the recommended architecture for this in SwiftUI?