iOS中菊花。。。

其实系统的菊花除了功能有点单一,不具有刷新页面的功能以外,其他都还好吧,满足你一些正常的提示功能还是绰绰有余的;直接把项目里面的代码粘出来吧,其实也没有什么特别要注意的地方,一些设置属性也算留个备份

菊花记得加在试图的最上面,不然就被遮住了!开启和关闭是 start和stop

_activity = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];//指定进度轮的大小

//设置背景透明

_activity.alpha = 0.8;

//设置背景为圆角矩形

_activity.layer.cornerRadius = 100;

_activity.layer.masksToBounds = YES;

[_activity setCenter:CGPointMake(KJSScreenWidth / 2, (KJSSereenHeight-64) / 2)];//指定进度轮中心点

[_activity setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhiteLarge];//设置进度轮显示类型

_activity.color = [UIColor grayColor];

[self.view addSubview:_activity];

UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(50, 120, 100, 50)];

label.text = @"正在加载...";

label.textColor = [UIColor grayColor];

label.textAlignment = NSTextAlignmentCenter;

label.autoresizesSubviews = YES;

[_activity addSubview:label];



文/LJR三门外天晴(简书作者)
原文链接:http://www.jianshu.com/p/f8e2c921dfc7
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
原文地址:https://www.cnblogs.com/zmloveworld/p/5412047.html