NSString *copyStringverse = [[NSString alloc] initWithFormat:@"%@",[textview.text]]; UIPasteboard *pb = [UIPasteboard generalPasteboard]; [pb setString:copyStringverse];
I'm using above code for copying contents in textview
, but I want to copy contents in a cell of the table. How to do this?
An object that helps a user share data from one place to another within your app, and from your app to other apps.
A pasteboard is a secure and standardized mechanism for the exchange of data within or between applications.
Well you don't say exactly how you have your table view cell set up, but if it's just text inside your table view it could be as easy as:
// provided you actually have your table view cell NSString *copyStringverse = yourSelectedOrClickedTableViewCell.textLabel.text; UIPasteboard *pb = [UIPasteboard generalPasteboard]; [pb setString:copyStringverse];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With