推荐iOS带有加载网络图片进度的UIImageView

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了推荐iOS带有加载网络图片进度的UIImageView相关的知识,希望对你有一定的参考价值。

  UCZProgressView 是一个带有通用的圆形图片进度下载控件。动画效果不错

  特性

  • Customizable indicator (line width, radius, and color)
  • Display a label with the current progress.
  • Customizable progress text label (color, size and font)
  • Customizable background view (blur style)
  • Fully support interface builder (IB_DESIGNABLE and IBInspectable)
  • Fully support UI_APPEARANCE_SELECTOR

技术分享  技术分享

技术分享  技术分享

 

  用法

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)

self.progressView.indeterminate = 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];

 

技术分享

Animation did stop block

 progressView.animationDidStopBlock = ^{
    [self presentViewController:_photoGallery animated:YES completion:nil];
};

 

 

代码库下载

以上是关于推荐iOS带有加载网络图片进度的UIImageView的主要内容,如果未能解决你的问题,请参考以下文章

iOS 一次上传多张图片, 并返回进度值

前端页面加载进度条的制作

iOS-利用OpenGL加载VR(本地/网络)图片

IOS 加载网络图片2

iOS SDWebImage 加载网络图片失败,重新运行才有图片

Glide4.10.0加载图片进度监听