我有一個登錄屏幕,當用戶名或密碼不正確時,會生成警報。現在,當用戶按下「確定」時,它將返回到登錄屏幕,但不會清除文本字段,並且仍然有以前的輸入。如何清除警報生成後的文本字段,我們按「確定」
如何將其刪除?
我警報味精代碼:
UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Login Failed"
message:@"Login id or password is incorrect"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[message show];
感謝。
使用alertview委託方法 - - (無效)alertView:(UIAlertView中*)alertView clickedButtonAtIndex :(NSInteger)buttonIndex ..... if(buttonIndex == 0)然後確定按下...並清除文本框然後.... – Prathiba 2012-03-13 05:48:49