title: How to show Actionsheet in iPad
body: <p>How can I show a <code>UIActionsheet</code> in iPad when I'm using my current code its giving me this error:</p>
  
  <blockquote>
    <p>Your application has presented a <code>UIAlertController</code> (<code>&lt;UIAlertController: 0x7f9ec624af70&gt;</code>) of style <code>UIAlertControllerStyleActionSheet</code>. The <code>modalPresentationStyle</code> of a <code>UIAlertController</code> with this style is <code>UIModalPresentationPopover</code>. You must provide location information for this popover through the alert controller's <code>popoverPresentationController</code>. You must provide either a <code>sourceView</code> and <code>sourceRect</code> or a <code>barButtonItem</code>.  If this information is not known when you present the alert controller, you may provide it in the <code>UIPopoverPresentationControllerDelegate</code> method <code>-prepareForPopoverPresentation</code>.</p>
  </blockquote>
  
  <p>which is working totally fine in an iPhone : </p>
  
  <pre><code>let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .ActionSheet)
  let reminderAction = UIAlertAction(title: "Reminder", style: .Default, handler: {
                  (alert: UIAlertAction!) -&gt; Void in }
  optionMenu.addAction(reminderAction)
  self.presentViewController(optionMenu, animated: true, completion: nil)
  </code></pre>
  
  <p>I came across some similar problems, the solution was this:</p>
  
  <pre><code>let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .ActionSheet)
  optionMenu.popoverPresentationController?.sourceView = self.view
  optionMenu.popoverPresentationController?.sourceRect = self.view.bounds
  </code></pre>
  
  <p>but it didnt worked for me maybe because my ActionSheet's Sender is on a UItableviewCell.</p>
  
  <p>I tired to set AlertController's Sourceview  to tableView's Cell but its not correctly placed and sometime its partially visible this is what I tried:</p>
  
  <pre><code>optionMenu.popoverPresentationController?.sourceView = currentCell.contentView
  optionMenu.popoverPresentationController?.sourceRect = currentCell.contentView.bounds
  </code></pre>
  
  <p>Any clue how can I fix this problem?</p>