I have to disable Paste option when user long press on UITextField.I have got this code but still it is not hiding Paste option.
-(BOOL)canPerformAction:(SEL)act
You have to create a new Class-> subclass of UITextField .. then in your code/xib change the textview class to your Custom Class.. and the add the method in your custom TextField class
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
if (action == @selector(paste:))
return NO;
return [super canPerformAction:action withSender:sender];
}
It will work then