So I want to present to the user an alert view for them to enter the password. I'd like to check to make sure that something was entered at the keyboard. I know in the UIAlertViewDelegate, you can get the text input. However, the only solution I have so far is, 

```
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
    NSLog(@"buttonIndex: %i", buttonIndex);

    if (buttonIndex == 0) {
        UITextField *passwordTextField = [alertView textFieldAtIndex:0];
        if (!passwordTextField.text.length == 0) {
            NSLog(@"password: %@", passwordTextField.text);
            // save the password
        }
        else {
            // Show the alert view again asking for the password
        }

    }

}

```

where I would ask for the password again right after they click ok if they didn't enter anything. Is there a better solution to this? Thanks!