应用中有一个alertView
,在服务器返回响应时使用。在应用向服务器发送数据之后,alertView
会显示,但是应该怎么关闭呢?
摘抄的部分代码:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Canceling reservation" message:@"please wait" delegate:self cancelButtonTitle:nil otherButtonTitles: nil];
[alert show];
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
// Adjust the indicator to place at the bottom of the dialog window.
indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height-50);
[indicator startAnimating];
[alert addSubview:indicator];