我有UIAlertView
UIActivityIndicatorView
。
UIAlertView *alertView_Spinning =
[[UIAlertView alloc] initWithTitle:@"Please wait"
message:@"Connecting to server"
delegate:nil
cancelButtonTitle:nil
otherButtonTitles: nil];
alertView_Spinning.tag=0;
UIActivityIndicatorView *indicator =
[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
[indicator startAnimating];
[alertView_Spinning setValue:indicator forKey:@"accessoryView"];
[alertView_Spinning show];
如何从以下方法中解除此警报:我可以使用警告标记解除吗?我的警报视图中没有包含任何按钮。
- (void)connectionDidFinishLoading:(NSURLConnection *)connection{
//dismiss alert view here
}
答案 0 :(得分:1)
您应该将其分配给当前类的ivar或属性而不是局部变量,然后在dismissWithClickedButtonIndex:animated:
处理程序中调用connectionDidFinishLoading:
。