UIAlertView - the alert box for the iPhone

There are times when the user needs to be presented with some information or question. MonoTouch has a UIAlertView object. The UIAlertView is instantiated with a set of parameters. On the object instance, the .Show() method is called. For .NET developers, this is similar in concept to the .NET MessageBox. For JavaScript developers, this is similar to the window.alert() and window.confirm() methods. 

                var av = new UIAlertView("Badness happened",

"The scheme '" + prot + "' is not supported on this device.",

                    null,

"Ok thanks", null);

                av.Show(); 

UIAlertView

Want to know more about developing with the iPhone?  Check out my Wrox Blox eBook on developing applications with MonoTouch for the iPhone/iPod touch for .NET/C# developers

1 Comment

  • Is it ever necessary to dispose of UI elements to release resources in MonoTouch (e.g. wrap the creation of the UIAlertView with "using")? If it's never necessary, why not? If it is sometimes necessary, what are the rules?

    TIA.

Comments have been disabled for this content.