I would like to create a Button that on tapped creates a draggable View on the screen using SwiftUI.
Implementation in UIKit
How can I get a behavior similar to the one listed above in SwiftUI?
Implementation in UIKit
Code Block swift // UIKit @IBAction func addTextBox(_ sender: UIButton) { print("Add an Emoji") let textView = UITextView() textView.text = "🇺🇸" textView.addGestureRecognizer(gesture) textView.addGestureRecognizer(pinchGesture) textView.addGestureRecognizer(rotationGesture) canvasView.addSubview(textView) }
How can I get a behavior similar to the one listed above in SwiftUI?