title: Sharing button works perfectly on iPhone but crash on iPad
body: <p>I'm trying to add a button in order to share some sentences in Twitter, Facebook... etc. It all works on all iPhone models but simulator crash with an iPad.</p>
  <p>This is my code:</p>
  <pre><code>@IBAction func shareButton(sender: AnyObject) {
      frase = labelFrases.text!
      autor = labelAutores.text!
  
      var myShare = &quot;\(frase) - \(autor)&quot;
      
      let activityVC: UIActivityViewController = UIActivityViewController(activityItems: [myShare], applicationActivities: nil)
  
      self.presentViewController(activityVC, animated: true, completion: nil)
  </code></pre>
  <p>And this is the error:</p>
  <blockquote>
  <p>Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (&lt;_UIAlertControllerActionSheetRegularPresentationController: 0x7c0f9190&gt;) should have a non-nil sourceView or barButtonItem set before the presentation occurs</p>
  </blockquote>
  <p>How should I solve it?</p>