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 @ 2020-04-24 09:32  YouNeedCourage  阅读(3800)  评论(0编辑  收藏  举报