I\'d like to do what this guy was trying to do but in SwiftUI, How can I convert the code in the answers to apply it to SwiftUI?