本文主要是介绍把UIActivityindicatorView 添加到 UIAlertView里面,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
实现在代码如下,比较简单,
-(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;
这篇关于把UIActivityindicatorView 添加到 UIAlertView里面的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!