Copy functionality in iOS by using UIPasteboard

前端 未结 5 730
清歌不尽
清歌不尽 2021-02-02 06:04
 NSString *copyStringverse = [[NSString alloc] initWithFormat:@"%@",[textview.text]];
 UIPasteboard *pb = [UIPasteboard generalPasteboard];
 [pb setString:copy         


        
5条回答
  •  无人及你
    2021-02-02 06:40

    For Swift2.2

    UIPasteboard.generalPasteboard().string = tableViewCell.textLabel.text
    

    By using this you can directly set the value to UIPasteboard.

提交回复
热议问题