pmusolino / PMAlertController

PMAlertController is a great and customizable alert that can substitute UIAlertController
MIT License
2.53k stars 186 forks source link

Display two alertVC #91

Closed Daksh14 closed 1 year ago

Daksh14 commented 5 years ago

I want to open another alertVC when you click a button, like a conformation type system. I implemented it like this

alertVC.addAction(PMAlertAction(title: "Delete", style: .default, action: { () in
   let conformation = PMAlertController(title: "Really delete this post?", description: nil, image: nil, style: .alert)
   conformation.addAction(PMAlertAction(title: "Yes", style: .default, action: { () in
      print("Capture action OK")
   }))
   TapticEngine.impact.feedback(.light)
   self.getTopMostViewController()?.present(conformation, animated: false, completion: nil)
}))

This does not work and doesn't show the controller. Any ideas how can I achieve this?