中文說明
基于CALayer封裝加載等待動畫,目前支持6種類型動畫:
typedef NS_ENUM(NSInteger, WBLoadingAnimationType) {
WBLoadingAnimationcircleStrokeSpinType,
WBWBLoadingAnimationBallPulseType,
WBWBLoadingAnimationBallClipRotateType,
WBWBLoadingAnimationBallClipRotatePulseType,
WBWBLoadingAnimationBallClipRotateMultipleType,
WBWBLoadingAnimationBallTrianglePathType,
WBLoadingAnimationBallSurround
};
復制代碼
Requirements
- iOS 8+
- Xcode 8+
Installation
Cocoapods安裝
WBLoadingIndicatorView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'WBLoadingIndicatorView'
復制代碼
手動安裝
將WBLoadingIndicatorView文件夾拖入工程即可。
Usage
- 使用示例
WBLoadingIndicatorView *indicatorView = [WBLoadingIndicatorView wb_showIndicatorAddTo:self.view];
indicatorView.type = WBLoadingAnimationBallSurround;
indicatorView.indicatorSize = CGSizeMake(45, 45);
indicatorView.backgroundView.backgroundColor = [UIColor whiteColor];
indicatorView.bezelView.style = WBLoadingIndicatorBackgroundSolidStyle;
indicatorView.bezelView.backgroundColor = [UIColor clearColor];
indicatorView.indicatorColor = [UIColor orangeColor];
復制代碼
Author
author:wenbo
QQ:1050794513
email:1050794513@qq.com
更新
- 2018-09-16 (1.1.1):重構,添加WBLoadingAnimationBallSurround動畫
- 2018-09-11 (1.0.1):添加背景模糊效果
License
WBLoadingIndicatorView is available under the MIT license. See the LICENSE file for more info.