美文网首页iOS开发拾碎其它
iOS 复制文本至剪贴板

iOS 复制文本至剪贴板

作者: 王加水 | 来源:发表于2020-07-02 14:27 被阅读0次

    使用 UIPasteboard

    • OC
    UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
    pasteboard.string = @"所需复制的内容";
    
    • swift
    let pasteboard = UIPasteboard.general
    pasteboard.string = "所需复制的内容"
    

    相关文章

      网友评论

        本文标题:iOS 复制文本至剪贴板

        本文链接:https://www.haomeiwen.com/subject/fqhrqktx.html