iOS 复制文本至剪贴板
2020-07-02 本文已影响0人
王加水
使用 UIPasteboard
- OC
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = @"所需复制的内容";
- swift
let pasteboard = UIPasteboard.general
pasteboard.string = "所需复制的内容"
使用 UIPasteboard
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = @"所需复制的内容";
let pasteboard = UIPasteboard.general
pasteboard.string = "所需复制的内容"