Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created January 8, 2021 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sturdysturge/32b58fb7bd2ca44022a29e06619cf8d3 to your computer and use it in GitHub Desktop.
Save sturdysturge/32b58fb7bd2ca44022a29e06619cf8d3 to your computer and use it in GitHub Desktop.
@available(OSX 10.16, *)
@available(iOS, unavailable)
@available(tvOS, unavailable)
@available(watchOS, unavailable)
struct PasteView: View {
@State var text = String()
let utType = UTType.text
var body: some View {
VStack {
TextEditor(text: $text)
PasteButtonView(utType: utType, text: $text)
}
.frame(width: 300, height: 300)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment