0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have 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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?