ユーザーが入力したテキストをクリップボードへコピーする方法をメモ。
INDEX
テキストをクリップボードへコピーする
UIPasteboard オブジェクトにテキストをペーストする。
[code]
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
[board setValue:@”テキスト” forPasteboardType:@”public.utf8-plain-text”];
[/code]
まとめ
Objective-Cでは厳密に言えばペーストボードへ文字列を貼り付ける、という意味になりますね。