MBSimpleLoadingIndicator 0.1.0

MBSimpleLoadingIndicator 0.1.0

测试测试
Lang语言 Obj-CObjective C
许可协议 MIT
Released最新发布2015年1月

Matt Brenman 维护。



demo

代码

  //Create the loader
  _loadview = [[MBLoadingIndicator alloc] init];

  //Start the loader
  [self.loadview start];

  //Add the loader to our view
  [self.view addSubview:self.loadview];

animprops

使用方法

更改百分比

//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 的问题报告系统提交问题

- 发送邮件到 [email protected]

- 在 @mattbrenman 上发推文,带上 #MBLoaderIndicator 标签

作者:

mbrenman,[email protected]