【推薦】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]; };

 

 

代碼庫下載


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM