测试测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可协议 | MIT |
Released最新发布 | 2015年1月 |
由 Matt Brenman 维护。
代码
//Create the loader
_loadview = [[MBLoadingIndicator alloc] init];
//Start the loader
[self.loadview start];
//Add the loader to our view
[self.view addSubview:self.loadview];
//Change the percentage
[_loadview incrementPercentageBy:17];
//Fill up and start ending animation
[_loadview finish];
//Change loader colors
[_loadview setLoadedColor:[UIColor darkGrayColor]];
[_loadview setLoaderBackgroundColor:[UIColor whiteColor]];
//Change loader sizes
[_loadview setWidth:15];
[_loadview setOuterLoaderBuffer:0];
//Move the loader
[_loadview offsetCenterXBy:50.0f];
[_loadview offsetCenterYBy:50.0f];
//Choose full circle, half circle, or line
[_loadview setLoaderStyle:MBLoaderFullCircle];
//Preset sizes (tiny, small, medium, large)
[_loadview setLoaderSize:MBLoaderLarge];
//If you need greater control over the size
[_loadview setRadius:30];
//Set where the line originates from (full circle style only)
[_loadview setStartPosition:MBLoaderRight];
//Set animation speed
[_loadview setAnimationSpeed:MBLoaderSpeedFast];
//Get the percentage amount that is full (after current animation)
NSInteger amt = [_loadview getPercentage];
//Hide the loader (useful if error in main app occured)
[_loadview dismiss];
要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install
。
通过 GitHub 的问题报告系统提交问题
- 在 @mattbrenman 上发推文,带上 #MBLoaderIndicator 标签
mbrenman,[email protected]