PasteButton
A system button that reads items from the pasteboard and delivers it to a closure.
Platform Compatibility
iOS 16.0+ iPadOS 16.0+ macOS 10.15+ visionOS 1.0+
Tags
SwiftUI Code
@State private var pastedText: String = ""
var body: some View {
HStack {
PasteButton(payloadType: String.self) { strings in
pastedText = strings[0]
}
}
}
Found an issue or have a suggestion?
Created: May 30, 2025Updated: June 3, 2025