UIAlertView is a class to display alert messages on screen.
Showing with Undo dialog animation
Signature | -(void)showWithAnimationType:(int)type; |
---|---|
Available in | 3.0 – |
Unlike all other dialogs which pops up, the Undo dialog appears by jiggling in from the side. You can do so with [alert showWithAnimationType:1].
Adding text fields
Signature | -(UIAlertSheetTextField*)addTextFieldWithValue:(NSString*)defaultText label:(NSString*)promptText; |
---|---|
Available in | 2.0 – |
Signature | -(UIAlertSheetTextField*)textFieldAtIndex:(NSInteger)index; |
---|---|
Available in | 2.0 – |
Signature | -(UIAlertSheetTextField*)textField; |
---|---|
Available in | 2.0 – |
Signature | -(NSInteger)textFieldCount; |
---|---|
Available in | 2.0 – |
You can create multiple text fields using the -addTextFieldWithValue:label: method. If you only need 1 text field, using the -textField method will automatically create only 1 for you. When the alert view has text fields, it will only be available in portrait position.
References
- Official reference: UIAlertView
- Header: http://github.com/kennytm/iphone-private-frameworks/blob/master/UIKit/UIAlertView.h