Please read this article
http://nshipster.com/uimenucontroller/ (It's about UILabel, not UITextField but is useful just for example and information about how copy/paste/edit actions work and how you can customize its' behavior)
I think you need to subclass UITextField
to MyTextField
for example, and override -(void)copy:
and -(void)paste:
methods from UIResponderStandardEditActions
.
In your implementation of these methods you should use your custom UIPasteboard
to copy text into and paste from it, like mentioned in this answer,
How to do copy/paste function programmatically in iphone?
but instead of using [UIPasteboard generalPasteboard]
use [UIPasteboard pasteboardWithName:@"myPasteboard" create:YES]