項(xiàng)目地址 Github
XYW8AnimationIndicatorView
A Windows startup indicatorviewStyle for iOS with Objective-C delegate support
iOS 仿照windows10 開機(jī)動(dòng)畫做的一個(gè)indicator view視圖 動(dòng)畫效果體驗(yàn)極佳
Short Cut

Flipboard playing multiple GIFs
English
How to Use
alloc and start animation
XYW8IndicatorView *animationView = [[XYW8IndicatorView alloc] init];
animationView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
animationView.frame = (CGRect){0,0,self.view.frame.size.width,self.view.frame.size.height};
animationView.dotColor = [UIColor redColor];
animationView.delegate = self;
[self.view addSubview:animationView];
[animationView startAnimating];
stop the animation
- (void)stopAnimating:(BOOL)animated;
- (void)stopAnimating:(BOOL)animated afterDelay:(NSTimeInterval)delay;
propertys
@interface XYW8IndicatorView : UIView
//set the animating dot backgroundcolor default set to [UIColor grayColor] if nil also set to [UIColor grayColor]
@property (nonatomic,strong) UIColor *dotColor;
//set the loadingLabel default set the text to @"loading"
@property (nonatomic,strong) UILabel *loadingLabel;
@property (nonatomic,assign) id<XYW8IndicatorViewDelegate> delegate;
//current animating state
@property (nonatomic,readonly,getter=isAnimating) BOOL animating;
Full Delegate Support
@protocol XYW8IndicatorViewDelegate <NSObject>
@optional
//called when clicked background view in here you can cut off background network requset
- (void)indicatorViewDidTapBakground:(XYW8IndicatorView *)indicatorView;
//called when the animation will/did start
- (void)indicatorViewWillStartAnimating:(XYW8IndicatorView *)indicatorView;
- (void)indicatorViewDidStartAnimating:(XYW8IndicatorView *)indicatorView;
//called when the animation will/did end
- (void)indicatorView:(XYW8IndicatorView *)indicatorView willEndAnimating:(BOOL)animted;
- (void)indicatorView:(XYW8IndicatorView *)indicatorView didEndAnimating:(BOOL)animted;
@end
Question
if any question or bug email me with xiaoamani@qq.com China
中文
使用說明
初始化和開始動(dòng)畫
XYW8IndicatorView *animationView = [[XYW8IndicatorView alloc] init];
animationView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
animationView.frame = (CGRect){0,0,self.view.frame.size.width,self.view.frame.size.height};
animationView.dotColor = [UIColor redColor];
animationView.delegate = self;
[self.view addSubview:animationView];
[animationView startAnimating];
停止動(dòng)畫
- (void)stopAnimating:(BOOL)animated;
- (void)stopAnimating:(BOOL)animated afterDelay:(NSTimeInterval)delay;
propertys
@interface XYW8IndicatorView : UIView
//set the animating dot backgroundcolor default or nil set to [UIColor grayColor]
//設(shè)置要進(jìn)行動(dòng)畫的點(diǎn)的背景顏色 如果傳入nil或不設(shè)置該參數(shù) 默認(rèn)設(shè)置成[UIColor grayColor]
@property (nonatomic,strong) UIColor *dotColor;
//set the loadingLabel default set the text to @"loading"
//設(shè)置動(dòng)畫過程中的loadingLabel的屬性 默認(rèn)文字為loading
@property (nonatomic,strong) UILabel *loadingLabel;
@property (nonatomic,assign) id<XYW8IndicatorViewDelegate> delegate;
//current animating state
//現(xiàn)在是否處于動(dòng)畫中
@property (nonatomic,readonly,getter=isAnimating) BOOL animating;
支持delegate
@protocol XYW8IndicatorViewDelegate <NSObject>
@optional
//call when clicked background view in here you can cut off background network requset
//當(dāng)tap背景時(shí),該函數(shù)會(huì)被觸發(fā),在這兒你可以取消后臺(tái)的網(wǎng)絡(luò)請(qǐng)求去刷新界面
- (void)indicatorViewDidTapBakground:(XYW8IndicatorView *)indicatorView;
//call when the animation will/did start
//當(dāng)動(dòng)畫 將要/已經(jīng) 開始時(shí)的回調(diào)
- (void)indicatorViewWillStartAnimating:(XYW8IndicatorView *)indicatorView;
- (void)indicatorViewDidStartAnimating:(XYW8IndicatorView *)indicatorView;
//call when the animation will/did end
//當(dāng)動(dòng)畫 將要/已經(jīng) 結(jié)束時(shí)的回調(diào)
- (void)indicatorView:(XYW8IndicatorView *)indicatorView willEndAnimating:(BOOL)animted;
- (void)indicatorView:(XYW8IndicatorView *)indicatorView didEndAnimating:(BOOL)animted;
@end