Guest User

Untitled

a guest
Feb 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @implementation UITextField (NotPastable)
  2.  
  3. - (BOOL)canPerformPasteAction:(SEL)action withSender:(id)sender
  4. {
  5.     if (( action == @selector(paste:) || action == @selector(cut:) )
  6.         &&
  7.         nil != self.inputView)
  8.     {
  9.         return NO;
  10.     }
  11.     return [self canPerformPasteAction:action withSender:sender]; //calling Swizzeled method
  12. }
  13.  
  14. @end
Add Comment
Please, Sign In to add comment