title: button inside a uitextview
body: <p><img src="https://i.stack.imgur.com/7Qfdz.png" alt="enter image description here">I am having a uitexview in that would like to have uibutton.when tapping on that button i want do some actions.So i did as below</p>
  
  <pre><code>UITextView *myTextView = [[UITextView alloc] init];
      myTextView.frame = CGRectMake(10, 100, 300, 80);
      myTextView.layer.borderWidth = 1.0f;
      myTextView.layer.cornerRadius = 5;
      myTextView.clipsToBounds = YES;
      myTextView.layer.borderColor = [[UIColor grayColor] CGColor];
      [self.view addSubview:myTextView];
      [myTextView sizeToFit];
      [myTextView release];
  
      // Create an UIButton
      UIButton *pickerBtn = [UIButton buttonWithType: UIButtonTypeCustom]; 
      // Set its background image for some states...
      UIImage *pickerImage = [UIImage imageNamed:@"picker.png"];
      [pickerBtn setBackgroundImage: pickerImage forState:UIControlStateNormal];  
      // Add target to receive Action
      [pickerBtn addTarget: self action:@selector(showPicker:) forControlEvents:UIControlEventTouchUpInside]; 
      // Set frame width, height
      pickerBtn.frame = CGRectMake(-25, -10, 50, 30);    
      pickerBtn.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
      pickerBtn.titleLabel.font = [UIFont boldSystemFontOfSize:13];
      pickerBtn.titleLabel.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5]; 
      pickerBtn.titleLabel.shadowOffset = CGSizeMake(0, -1);
      pickerBtn.bounds = CGRectInset(button.bounds, -3, 2);
      pickerBtn.titleLabel.textColor = [UIColor whiteColor];
      [myTextView addSubview:pickerBtn];
  </code></pre>
  
  <p>But what my problem is cursor shows even on that button. </p>
  
  <p>Is there any better way to do wat i am trying now</p>
  
  <p>Please let me know and thanks</p>