Copy Text to Clipboard (Pasteboard) from UITextView via UIButton?
Is there any way to copy text from a TextView that has User Interaction is enabled to the clipboard via a UIButton?
But instead of the user holding down his finger on the uitextview so that the apple standard window popups to copy I want the user to be able to do with just the click of the button .. (Whole text)
In the button's target action, call
[UIPasteboard generalPasteboard].string = uiTextView.text;
You could take the actual UIView, that the current UIViewController shows and loop through the subviews to get all UITextView's that have user interaction enabled. Or do you have only one textview?
You can get the text of a UITextView with its text property and copy this text with the method KennyTM described above:
[UIPasteboard generalPasteboard].string = yourTextView.text;