Writing a function for UIAlertView?
Posted
by worchyld
on Stack Overflow
See other posts from Stack Overflow
or by worchyld
Published on 2010-06-10T07:22:06Z
Indexed on
2010/06/10
7:22 UTC
Read the original article
Hit count: 235
uialertview
I'm sick of writing basic UIAlertView's, ie:
UIAlertView *alert = [[UIAlertView alloc] initWith...]] //etc
Instead of doing this, is it possible to put all this in a "helper" function, where I can return the buttonIndex, or whatever an alert usually returns?
For a simple helper function I guess you could feed parameters for the title, message, I'm not sure whether you can pass delegates in a parameter though, or bundle info.
In pseudo-code, it could be like this:
someValueOrObject = Print_Alert(Title="", Message="", Delegate="", Bundle="") // etc
Any help on this would be great.
Thanks
© Stack Overflow or respective owner