1. UIActivityIndicatorView(旋转的进度条)
1)定义:UIActivityIndicatorView* indicator ;
2)设置属性:
indicator = [[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(0, 0, 20, 20)];//指定进度轮的大小,一般为20,20{x,y,height,weight}
[indicatorsetCenter:CGPointMake(160, 140)];//指定进度轮中心点
[indicatorsetActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhiteLarge];//设置进度轮显示类型
3)添加到要加载的视图中
[self.view addSubview:indicator];
4)启动进度条
[indicator startAnimating];
5)关闭进度条
[indicatorstopAnimating];