UIActivityIndicatorView---iOS-Apple苹果官方文档翻译
本系列所有开发文档翻译链接地址:
iOS7开发-Apple苹果iPhone开发Xcode官方文档翻译PDF下载地址
UIActivityIndicatorView
activityIndicatorViewStyle
设置指示器的样式
UIActivityIndicatorViewStyleWhiteLarge
UIActivityIndicatorViewStyleWhite (默认样式)
UIActivityIndicatorViewStyleGray
2.hidesWhenStopped
当停止动画的时候,是否隐藏。默认为YES。
3. 实例化指示器对象,根据样式设置尺寸,不需要手动设置。
-(id)initWithActivityIndicatorStyle:(UIActivityIndicatorViewStyle)style;
4.开启动画
- (void)startAnimating;
5.关闭动画
- (void)stopAnimating;
6.是否在动画
- (BOOL)isAnimating;
7. UIActivityIndicatorView使用注意
7.1初始化的时候不需要设置尺寸,设置尺寸也没有效果。
7.2 必须调用startAnimating才会显示UIActivityIndicatorView
// 初始化指示器
//技术博客http://www.cnblogs.com/ChenYilong/ 新浪微博http://weibo.com/luohanchenyilong
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
// 设置指示器位置
indicator.center = CGPointMake(self.view.frame.size.width * 0.5, self.view.frame.size.height * 0.5);
// 开启动画,必须调用,否则无法显示
[indicator startAnimating];
[self.view addSubview:indicator];
//转载请注明出处--本文永久链接:http://www.cnblogs.com/ChenYilong/p/3495696.html
本文对应pdf文档下载链接,猛戳—>:https://www.evernote.com/shard/s227/sh/104f66d3-c781-4ace-a922-a640802ff7d2/b869cfa60eb6331a9b3234c53e414205
本系列所有开发文档翻译链接地址:iOS7开发-Apple苹果iPhone开发Xcode官方文档翻译PDF下载地址
最新文章
- C语言的傻瓜式随笔(一):嵌套循环-程序结构
- JavaScript 事件 编程练习
- C语言基础(1)-基本语法及注意事项
- C#将科大讯飞语音合成文件转换为MULAW音频格式
- 成都印迹婚纱摄影 | yinjilove.com
- 【BZOJ-3696】化合物 树形DP + 母函数(什么鬼)
- angularJs非空校验requied
- java.lang.NoClassDefFoundError: antlr/ANTLRException
- java窗口添加背景
- codeForce-19D Points (点更新+离散化)
- [JSOI2008] 完美的对称
- css案例学习之父子块的margin
- 2.2 sikuli中编程运行
- HDU 2188 悼念512汶川大地震遇难同胞——选拔志愿者(基础巴什博奕)
- sql备份文件兼容性问题
- php-msf 源码解读【转】
- IDEA 相关整理
- ubuntu 16.04 安装 opencv +contrib (3.2.0) + python 3.5
- 服务网关zuul之四:zuul网关配置
- hdu 2647 (拓扑排序 邻接表建图的模板) Reward