UIActivityIndicatorView

UIActivityIndicatorView



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];

©  chenyilong. Powered by  Postach.io

你可能感兴趣的:(Activity)