We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need to disable copy and cut and have found this post: https://stackoverflow.com/a/11290826/8710951
I have created a category file as instructed:
UIWebView+DisableCopy.h
#import <UIKit/UIKit.h> @interface UIWebView (DisableCopy) - (BOOL)canPerformAction:(SEL)action withSender:(id)sender; @end
UIWebView+DisableCopy.m
#import "UIWebView+DisableCopy.h" @implementation UIWebView (DisableCopy) - (BOOL)canPerformAction:(SEL)action withSender:(id)sender { BOOL superCanPerform = [super canPerformAction:action withSender:sender]; if (superCanPerform) { if (action == @selector(copy:) || action == @selector(cut:)) { return NO; } } return superCanPerform; } @end
Then I imported this file in RCTWebViewBridge.m: #import "UIWebView+DisableCopy.h"
#import "UIWebView+DisableCopy.h"
However, the above approach has taken no effect. I have zero knowledge about objective C. What would be the correct way to do this?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I need to disable copy and cut and have found this post: https://stackoverflow.com/a/11290826/8710951
I have created a category file as instructed:
UIWebView+DisableCopy.h
UIWebView+DisableCopy.m
Then I imported this file in RCTWebViewBridge.m:
#import "UIWebView+DisableCopy.h"
However, the above approach has taken no effect. I have zero knowledge about objective C. What would be the correct way to do this?
The text was updated successfully, but these errors were encountered: