mtonio91 / AMSmoothAlert

Cool AlertView
MIT License
1.26k stars 158 forks source link

#8 - Add delegates for alertViewWillShow, alertViewDidShow, alertViewWil... #12

Closed evliu closed 10 years ago

evliu commented 10 years ago

...lDismiss, alertViewDidDismiss

Since the AMSmoothAlertView isn't a straight drop-in replacement of UIAlertView, these will come in handy, for example, when certain UI components need component.enabled = NO, especially if that component triggers an alert, because multiple alerts will just start stacking on top of each other.

Since the keyboard stays on top of the blurred image view, if I hit "Go" on the keyboard and that triggers an alert, I can inadvertently make a bunch of AMSmoothAlertViews start appearing and make an ugly stack of them.

mtonio91 commented 10 years ago

Have you tested this yet ? At the moment i can't test it so i'll check this out later (maybe this evening or tomorrow, in Canada)

evliu commented 10 years ago

I added working examples in the demo for all the delegates, but definitely double check for me. sorry this is all so hacker-dev style, haha, i'll try to package my future PRs well to make sure nothing breaks.

In running the AppDemo included with the project, all the delegates work as expected but I haven't tried all boundary cases. I hope these are trivial enough, but no rush to merge them in right away, just contributing [:

mtonio91 commented 10 years ago

Thank you for contributing anyway ;) I'll double check asap !