Is there a way to mimic this functionality found in UIKit in SwiftUI?
Long story short, I am creating an interactive SceneKit view (currently in UIKit) that anchors 2D UIViews over nodes, for navigation and labelling.
I would like to migrate over to SwiftUI, but I am having difficulties mimicking this functionality.
let subViews = self.view.subviews.compactMap{$0 as? UIButton}
if let view = subViews.first(where: {$0.currentTitle == label}) {
view.center = self.getScreenPoint(renderer: renderer, node: node)
}
Can anyone help me with this?
Thanks!