應用中有一個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];