UITextView禁止长按弹出复制等

复制代码
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UITextView (HDUtil)



@end

NS_ASSUME_NONNULL_END
复制代码
复制代码
#import "UITextView+HDUtil.h"


@implementation UITextView (HDUtil)


- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {    
    if (action == @selector(copy:) || action == @selector(cut:)) {
        return [HDUserInfo sharedUserInfo].isVip;
    }
    return [super canPerformAction:action withSender:sender];
}


@end
复制代码

 

posted @   YouNeedCourage  阅读(3914)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示