首页 > 代码库 > UIActivityIndicatorView
UIActivityIndicatorView
//声明对象
@property (nonatomic,strong) UIActivityIndicatorView *activityindicator;
self.activityindicator = [[UIActivityIndicatorViewalloc] initWithFrame:CGRectMake((self.view.frame.size.width-100)/2.0, self.view.frame.size.height/2.0, 100, 100)];
self.activityindicator.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0.5];
//设置风格
self.activityindicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
//一个布尔值,用于控制在动画停止时是否隐藏接收者
self.activityindicator.hidesWhenStopped = YES;
//启动
[self.activityindicator startAnimating];
//暂停
//[self.activityindicator stopAnimating];
//状态
//self.activityindicator.isAnimating;
//设置活动指标的颜色
self.activityindicator.color = [UIColor blueColor];
[self.view addSubview:self.activityindicator];
//设置风格
self.activityindicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
//一个布尔值,用于控制在动画停止时是否隐藏接收者
self.activityindicator.hidesWhenStopped = YES;
//启动
[self.activityindicator startAnimating];
//暂停
//[self.activityindicator stopAnimating];
//状态
//self.activityindicator.isAnimating;
//设置活动指标的颜色
self.activityindicator.color = [UIColor blueColor];
[self.view addSubview:self.activityindicator];
UIActivityIndicatorView
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。