iOS剪切板简单的读写

#pragma mark 剪切板 : 写入系统剪切板

-(NSString *)writeToPasteBoard:(NSString *)content{


  UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];

  [pasteboard setString:content];

  return 0;

}

#pragma mark 剪切板 : 读取系统剪切板

-(NSString *)readFromPasteBoard{


  NSString *content = [[UIPasteboard generalPasteboard] string];

  return content;

}

你可能感兴趣的:(iOS剪切板简单的读写)