Drag to select multiple views in SwiftUI (Written in Swift 5 / iOS 15)
This wrapper view allows you to select multiple views in SwiftUI. You provide the view frames using a GeometryReader
and the functionality to support selecting and deselecting objects. This wrapper takes care of the rest.
//
// DragSelectContainerView.swift
//