SwiftUI device-specific implementations

I have some custom controls I developed in my traditional Swift/UIKit applications and am thinking about migrating them to SwiftUI. However, the controls are currently iOS-specific. When implemented on macOS, I'd probably choose a different approach.


I have yet to see any guidance (from Apple or from the numerous SwiftUI blog posts) as to the best way to approach building a custom control that have device-specific implementations.


Can someone offer guidance or suggestions for getting started? I'm assuming that the solution is to provide device-specific conditional compilation, but a list of which methods need to be overridden would be a great start.


Thanks,


Rick Aurbach

SwiftUI device-specific implementations
 
 
Q