NOTE: This solution won't work on iOS 7 and above.
This is my take on it:
alertView = [[UIAlertView alloc] initWithTitle:@"Submitting Entry"
message:@"
"
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
[alertView addSubview:spinner];
[spinner startAnimating];
[alertView show];
and dismiss in code using:
[alertView dismissWithClickedButtonIndex:0 animated:YES];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…