Tag Archives: UIAlertView

UIAlertView – a simple text input dialog box

Create the alertView with style UIAlertViewStylePlainTextInput:

This produces an alertView:

UIAlertView that uses the UIAlertViewPlainTextInput alertStyle to ask a user name

When pressing any buttons, the regular delegate methods will be called and you can extract the textInput there like so:


UIAlertView – creating and detecting button tap

Declare the UIAlertView delegate in the yourViewController.h:


Create the alertView:


Detect which alertView button was tapped: