zoukankan      html  css  js  c++  java
  • 【推荐】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];
    };

    代码库下载

  • 相关阅读:
    列出对像属性,for(var i in obj)
    检测碰撞实例
    Rectangle 、getBounds(this)
    判断mc是否播放完成的简单方法
    操作规范时间工具类
    文本框中文字用htmlText操作并且实现文本框中文字加链接【link的用法】
    让舞台上的btn灰掉
    简单的缓动
    加入文本框
    HDU 1297 Children’s Queue (DP)
  • 原文地址:https://www.cnblogs.com/salam/p/5186608.html
Copyright © 2011-2022 走看看