Update @ 2012-07-11: for ios >= 5.1 canPerformAction:(SEL)action withSender:(id)sender is not working anymore. Please refer to the following post for more information
StackOverflow – How do you REALLY remove Copy from UIMenuController
–
If you want to disable the Cut/Copy/Paste Menu, add the following piece of code in the implementation file of the view controller which containing the UITextField
-(BOOL)canPerformAction:(SEL)action withSender:(id)sender {
UIMenuController *menuController = [UIMenuController sharedMenuController];
if (menuController) {
[UIMenuController sharedMenuController].menuVisible = NO;
}
return NO;
}
It overrides the canPerformAction:withSender method of the UIResponder class.
Done =)
Reference: How to disable Cut, Copy and paste feature

Is this OK with Apple?
LikeLike
i submitted the app last week and it is not yet approved. let u know after i get the reply from Apple. =)
LikeLike
Then the application is approved?
In every case, good solution.
Matteo
LikeLike
The app was approved without problem. so it should be apple-safe. =P
LikeLike
This is not working for me!
I just pasted your code in my project’s Registration form. (I have class RegistrationForm that subclasses UIViewController)
On this class’ XIB, I have 4 UITextFields.
1. Master Password UITextField
2. Re-enter Master Password UITextField
3. Email ID UITextField
4. Re-enter Email ID UITextField
Now, I don’t want users to copy or paste or select text on these text fields.
I just pasted the above code in my implementation file – RegistrationForm.m
But, it is not working. I am able to see the floating Copy, cut, paste menu and also perform the same actions.
Please help me!
Chandra
LikeLike
for ios >= 5.1 canPerformAction:(SEL)action withSender:(id)sender is not working anymore.
I think you can find some useful information in the following post.
StackOverflow – How do you REALLY remove Copy from UIMenuController
LikeLike
Thanks ykyuen, for your prompt reply! And also, thanks for other alternate solution.
Chandra
LikeLike
you are welcome~ =)
LikeLike
not working …
LikeLike
Have you tried the alternative solution in this comment?
LikeLike
I will now… thanks!
LikeLike
you are welcome~ hope you could solve the problem.
LikeLike
this code is not working…
please help me…
LikeLike
This post is too old. Take a look on the following reference.
StackOverflow – Disable UITextview selection text and copy/paste Menu
LikeLike