I want to show alertview with message: \"Loading data\" and spinning activity indicator. How can I do this?
you can add a label and activityindicator as subviews of your alert view. you have to do some thing like this...
- (IBAction)showAlertWithActivity:(id)sender{
alerta = [[UIAlertView alloc] initWithTitle:@"Guardando datos..."
message:@"\n"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:nil];
UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
spinner.center = CGPointMake(139.5, 75.5); // .5 so it doesn't blur
[alerta addSubview:spinner];
[spinner startAnimating];
[alerta show];
[self performSelector:@selector(close) withObject:self afterDelay:1];
}
-(void)close{
[alerta dismissWithClickedButtonIndex:0 animated:YES];
}