LoginSignup
0
1

More than 1 year has passed since last update.

【SwiftUI】View上のテキストをクリップボードに直接コピーする

Last updated at Posted at 2021-11-12

ボタンを使用する

クリック時に、ios端末のクリップボードに直接コピーが可能。

Button(action:{
    UIPasteboard.general.string = "コピーしたい文字列"
}){
    Text("コピーしたい文字列")
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1