'SwiftUI - How can I get stickers from keyboard to my app?
I am trying to get stickers from the keyboard and display it in my app. I've seen whatsapp has this feature but it's been a real headache trying to implement it.
I have the following but it just crashes when trying to set the memojuString as the pasted item. Any ideas?
@State private var memojiString: UIImage = UIImage()
Button {
memojiString = UIPasteboard.general.image!
} label: {
Text("Paste memoji")
}
Image(uiImage: memojiString)
Full code here:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

