I have a login screen and when userid or password is incorrect, an alert is generated. Now when the user presses “OK” it returns back to login screen but doesn’t clear the text field and still has the previous input.
How to remove it?
my code for alert msg is:
UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Login Failed"
message:@"Login id or password is incorrect"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[message show];
Thanks.
You should set
delegatetoselfYour alert will be :
and use :