Suppose you have an OK button (or something similar) as the first of the other UIAlertView buttons. Next, suppose you want this button to turn on if and only if the length of the text in the text field is greater than 0. Then the solution for checking is simple. In the delegate of the UIAlertView implementation:
- (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView
{
return [[alertView textFieldAtIndex:0].text length] > 0;
}
( clickedButtonAtIndex:), , .
Apple, . , "" .