Created
February 22, 2011 06:05
-
-
Save laiso/838284 to your computer and use it in GitHub Desktop.
UIWebView でコピー&ペースト(カットも)のメニュー呼び出しを無効化して禁止にするやつ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - | |
#pragma mark Managing the Selection and the Edit Menu | |
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender { | |
UIMenuController *menuController = [UIMenuController sharedMenuController]; | |
[menuController setMenuVisible:NO animated:NO]; | |
if (action == @selector(cut:) || | |
action == @selector(copy:) || | |
action == @selector(paste:)) { | |
return NO; | |
} else { | |
return [super canPerformAction:action withSender:sender]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment