ios - 在 iOS 中如何将字符串复制到剪贴板(粘贴板)?

标签 ios cocoa-touch copy-paste uipasteboard

在 iOS 中如何将字符串复制到剪贴板?我在文档中搜索了“剪贴板”,但没有找到任何结果。

最佳答案

像这样:

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

Apple 不使用术语“剪贴板”;在 iOS 中,它是一个“粘贴板”,您可以拥有多个。

关于ios - 在 iOS 中如何将字符串复制到剪贴板(粘贴板)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13054014/

相关文章:

ios - Swift 中的 UIViewController 初始化

asp.net - 防止在 Visual Studio 2008 ASP.NET Web 窗体中复制粘贴时自动生成 ID

html - 从 contenteditable 剪切/粘贴到其本身在 Firefox 中不起作用

excel - VBA将多张纸从一个wb复制到新的wb中(每张纸一个wb)

ios - Objective-C - 何时使用 NSNumber 与 Primitive

ios - Swift 4 - Collection View 将节插入应用于标题?

iOS 7 仅在某些时候使用自定义交互过渡

ios - Firebase iOS 设置 - nil senderID

iphone - UIApplicationDelegate协议(protocol)中神秘的+initialize方法: Why can't I see it in the documentation?

iphone - Objective-C : How to grab a number after a sub string from string