title: How to disable copy share option while selecting text in uiwebview? But selecting text should work
body: <p>I want to restrict user from copying and sharing text in <code>UIWebView</code>. </p>
  
  <p>The code i'm using is </p>
  
  <pre><code>- (void)viewDidLoad {
  [super viewDidLoad];
  self.webview.delegate = self;
  NSString *path = [[NSBundle mainBundle] pathForResource:@"SampleHTML" ofType:@"html"];
  NSString *htmlContent = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
  [self.webview loadHTMLString:htmlContent baseURL:[NSURL URLWithString:@""]];
  
  // Do any additional setup after loading the view, typically from a nib.
  </code></pre>
  
  <p>}</p>
  
  <pre><code>-(BOOL)canPerformAction:(SEL)action withSender:(id)sender
  {
  if (action == @selector(copy:))
  return NO;
  
  else if (action == @selector(select:))
  return YES;
  
  return [super canPerformAction:action withSender:sender];
  }
  </code></pre>