https://github.com/YouXianMing

[翻译] UCZProgressView

UCZProgressView

UCZProgressView is a circular progress indicator with cool animations for image loading.

UCZProgressView是一个圆形进度条指示器,包含了非常酷炫的动画效果.

This progress view is inspired by Michaël Villar's motion effect 08-Photo Loading.

这个进度指示器效果的灵感来自于 Michaël Villar's motion effect 08-Photo Loading.

  • Customizable indicator (line width, radius, and color) 可自由定制的基本属性
  • Display a label with the current progress. 根据当前的进度来显示一个label
  • Customizable progress text label (color, size and font) 可以定制进度条的label
  • Customizable background view (blur style) 可以模糊背景
  • Fully support interface builder (IB_DESIGNABLE and IBInspectable) 完整的支持支持IB
  • Fully support UI_APPEARANCE_SELECTOR 完整的支持UI_APPEARANCE_SELECTOR

Usage-使用

self.progressView = [[UCZProgressView alloc] initWithFrame:self.view.bounds];
self.progressView.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:self.progressView];

NSDictionary *views = NSDictionaryOfVariableBindings(_progressView);
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[_progressView]-0-|" options:0 metrics:nil views:views]];
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-0-[_progressView]-0-|" options:0 metrics:nil views:views]];

Show indeterminate state (default value is YES)

显示不确定的状态(默认开启)

Show progress

显示进度条

self.progressView.progress = 0.7;

Show indicator text label

显示指示器的文本

self.progressView.showsText = YES;

Indicator and indicator text color

指示器的颜色以及文本的颜色

self.progressView.showsText = YES;
self.progressView.tintColor = [UIColor blueColor];

Text color

文本的颜色

self.progressView.showsText = YES;
self.progressView.tintColor = [UIColor blueColor];
self.progressView.textColor = [UIColor redColor];

Radius

圆角值

self.progressView.radius = 40.0;

Line width

线条宽度

self.progressView.lineWidth = 6.0;

Blur background view

模糊背景

self.progressView.blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];

Requirements-需要的环境

iOS 5 or later 

iOS 5 以及以上

Installation-安装

UCZProgressView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'UCZProgressView'

你可以通过CocoaPods安装

Author

kishikawa katsumi, kishikawakatsumi@mac.com

License

UCZProgressView is available under the MIT license. See the LICENSE file for more info.

 

posted @ 2015-01-28 21:56  YouXianMing  阅读(778)  评论(0编辑  收藏  举报