UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:@"此用户不存在" delegate:self cancelButtonTitle:@"关闭" otherButtonTitles:nil];
[alertView setTag: 10000];
[alertView show];
[alertView release];
//点击关闭的时候响应的函数
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
if ([alertView tag] == 10000) { // it's the Error alert
if (buttonIndex == 0) { // and they clicked OK.
}
}
}