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

猜你喜欢

转载自www.cnblogs.com/siasyl/p/12765343.html