什么在程序中执行?

时间:2017-01-25 07:28:19

标签: ios objective-c

UIPasteboard *clipboard = UIPasteboard.General;
clipboard.string =  @"string being added to clipboard";

这是错误在'UIPasteboard'类型的对象上找不到属性'General' 这个代码实际上会在哪里执行?

1 个答案:

答案 0 :(得分:0)

格式不正确。您需要更改为格式

UIPasteboard *clipboard = [UIPasteboard generalPasteboard];
clipboard.string = @"string being added to clipboard";

Copy text to Clipboard