I\'m a beginner with Swift, and I\'m trying to figure out how can I read what has been copied to the clipboard On macOS (Swift 3)? I\'ve searched a lot but can\'t seem to find a
Easier ✅ Swift 4:
@IBAction func pasteAction(_ sender: Any) { guard let stringToPaste: String = UIPasteboard.general.items.last?.first?.value as? String else { return } MYTEXTVIEW.text = stringToPaste }