实现在代码如下,比较简单,
-(void)showMessage{
alert = [[UIAlertView alloc] initWithTitle:@" " message:@" Connecting to App Store, please wait" delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
UIActivityIndicatorView *progress= [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125, 100, 30, 30)];
progress.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
[alert addSubview:progress];
[progress startAnimating];
[alert show];
[alert release];
}
关闭 UIAlertView
[alert dismissWithClickedButtonIndex:0 animated:YES];
当然,你需要在.h文件里添加
UIAlertView *alert;