如何在iOS中将字符串复制到剪贴板(粘贴板)上? [英] How do you copy a string onto the clipboard (Pasteboard) in iOS?

查看:536
本文介绍了如何在iOS中将字符串复制到剪贴板(粘贴板)上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在iOS中将字符串复制到剪贴板上?我在文档中搜索了剪贴板",但没有找到匹配结果.

How do you copy a string onto the clipboard in iOS? I searched for "clipboard" in the docs, and got no hits.

推荐答案

像这样:

    [UIPasteboard generalPasteboard].string = @"hello!";

Apple不使用剪贴板"一词;在iOS中,这是一个粘贴板",您可以有多个.

Apple doesn't use the term "clipboard"; in iOS it's a "pasteboard", and you can have more than one of them.

这篇关于如何在iOS中将字符串复制到剪贴板(粘贴板)上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆