pmusolino / PMAlertController

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

Update image after alert displayed #54

Closed fvisticot closed 6 years ago

fvisticot commented 6 years ago

I would like to update the image after some time (progress result) How to do that ? I try to update image but it does not work

pmusolino commented 6 years ago

Hi @fvisticot if you alloc a PMAlertController without any image, the imageview height is zero, and if you try to update the image you can't see it.

If you want to update an alert that initially is not populated with an image, you can do this:

alertVC.alertImage.image = UIImage(named: "flag.png") //new image
alertVC.headerViewHeightConstraint.constant = 100 //set the imageview height constraint

-Paolo