pmusolino / PMAlertController

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

Feature Request: Dim background while presenting PMAlert #67

Closed sandeepbol closed 6 years ago

sandeepbol commented 6 years ago

I tried using a different alertMaskBackground image but that didn't work for me in dismissWithBackgroudTouch = true mode. Can you suggest workaround for it or implement it in future release?

pmusolino commented 6 years ago

What is the final result that you expect?

sandeepbol commented 6 years ago

in dismissWithBackgroundTouch mode enabled, there should be an option to dim the background (a custom UIView() layer behind the alert)?

pmusolino commented 6 years ago

So you want to hide what you see behind the alert? In this case, you can use the UIImageView called alertMaskBackground.

sandeepbol commented 6 years ago

I write in the original question, alertMaskBackground didn't work for me.

pmusolino commented 6 years ago

I tried to set a background image

alertVC.alertMaskBackground.image = UIImage(named: "myImage.png")
alertVC.dismissWithBackgroudTouch = true

and it worked! 👍

sandeepbol commented 6 years ago

Thanks a lot buddy. I will give it an another try as you suggested and it should work. Let me get back to you with my findings asap. Then we can close the ticket. Thanks again for your help :)