title: Error: Cannot convert value of type '(_, _) -> Void' to expected argument type '((UIAlertAction) -> Void)?'
body: <p>I have a button created in my <code>Main.storyboard</code>, which has a name (a <code>var</code>) named <code>deleteButton</code>. This button is in each cell.</p>
  
  <p>When the user presses the button, an alert pops up to confirm the deletion. Here is the code.</p>
  
  <pre><code>@IBAction func deletePinpoint(sender: UIButton) {
  
      let  alertController = UIAlertController(title: "Delete pinpoint", message: "Do you want to delete this pinpoint?", preferredStyle: UIAlertControllerStyle.Alert)
  
      alertController.addAction(UIAlertAction(title: "Yes", style: UIAlertActionStyle.Default, handler: { (action, indexPath) -&gt; Void in
  
          if let managedObjectContext = (UIApplication.sharedApplication().delegate as? AppDelegate)?.managedObjectContext {
              let pinpointToDelete = self.fetchResultController.objectAtIndexPath(sender.tag) as! Pinpoints
              managedObjectContext.deleteObject(pinpointToDelete)
  
              do {
                  try managedObjectContext.save()
              } catch {
                  print(error)
              }
          }
      }))
  
      alertController.addAction(UIAlertAction(title: "Cancel", style: .Cancel, handler: nil))
  
      self.presentViewController(alertController, animated: true, completion: nil)
  }
  </code></pre>
  
  <p>In the <code>cellForRowAtIndexPath:</code> method, I have declared this line:</p>
  
  <pre><code>cell.deleteButton.tag = indexPath.row
  </code></pre>
  
  <p>I get the error on the 3rd line (starting with <code>alertController.addAction</code>) saying:</p>
  
  <blockquote>
    <p>Cannot convert value of type '(_, _) -> Void' to expected argument type '((UIAlertAction) -> Void)?'</p>
  </blockquote>
  
  <p>How do I fix this?</p>