title: iOS UIActionSheet for NSDataDetector and double modal view
body: <p>I am having an issue with the detected numbers in iOS 7 and iPhone, when the user long tap the number detected by the OS, it prompts an UIActionSheet with the options: "Call", "Send Message", "Add to Contacts", "Copy" and "Cancel". The problem I am facing is, when the option "Send Message" or "Add to Contacts" is tapped, the OS creates an modal view on top of my current modal view, which leads to having the navigation bar of the second modal view not being displayed correctly.</p>
  
  <p>With that in mind, I am not able to assert at which moment the user has tapped which button, because it is not me who created the UIActionSheet (iOS does itself), then I can not receive any kind of delegate methods. The only message sent to the UIViewController is: </p>
  
  <pre><code>      -(BOOL)textView:(UITextView *)textView 
  shouldInteractWithURL:(NSURL *)URL 
                inRange:(NSRange)characterRange
  </code></pre>
  
  <p>Which tells me what kind of data was tapped once by the user (but not long tapped). I tried as well with the method call:</p>
  
  <pre><code>-(void)viewWillDisappear:(BOOL)animated
  -(void)viewDidDisappear:(BOOL)animated
  </code></pre>
  
  <p>Unfortunately, they are never invoked on iOS7, whereas iOS8 does. Which drives me to the conclusion that, so far, this issue is only iOS7 related, I am using an iPhone 4 with iOS 7.1.2. When I tried the same case in iOS8, the second modal view renders correctly, being placed on top of my current view. </p>
  
  <p>I hope someone has more info or other ideas.</p>
  
  <p>Thanks!!</p>
  
  <p><img src="https://i.stack.imgur.com/niTEw.png" alt="iOS UIActionSheet for the phone">
  <img src="https://i.stack.imgur.com/grYpI.png" alt="Wrong navigation bar, it lies on top of the normal &quot;Add contacts&quot; navigation bar"></p>