标签:round uicolor 设置 ini ati oid style after white
- (void)viewDidLoad {
[super viewDidLoad];
// 创建一个UIActivityIndicatorView,大小是固定的
UIActivityIndicatorView *aiv = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
// 设置中心点
aiv.center = CGPointMake(200, 300);
// 颜色
aiv.color = [UIColor greenColor];
// 让UIActivityIndicatorView转起来
[aiv startAnimating];
// 5秒之后,让UIActivityIndicatorView停止动画
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[aiv stopAnimating];
});
[self.view addSubview:aiv];
self.view.backgroundColor = [UIColor grayColor];
}
UI第十一节——UIActivityIndicatorView
标签:round uicolor 设置 ini ati oid style after white
原文地址:http://www.cnblogs.com/laolitou-ping/p/6244177.html