2012년 8월 15일 수요일

UITextView コピー禁止する方法


@implementation UITextView(Private)
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
[UIMenuController sharedMenuController].menuVisible = NO; //do not display the menu
[self resignFirstResponder]; //do not allow the user to selected anything
return NO;
}
@end
上記カテゴリを追加する

댓글 없음:

댓글 쓰기