【推荐】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
andIBInspectable
) - 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: metrics:nil views:views]];
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-0-[_progressView]-0-|" options: 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带动画的环形进度条(进度条和数字同步)
本篇写的是实现环形进度条,并带动画效果,要实现这些,仅能通过自己画一个 方法直接看代码 为了方便多次调用,用继承UIView的方式 .m文件 #import <UIKit/UIKit.h> ...
- IOS UIwebView 加载网络图片 使用相对地址
方法一: 在html文件内直接使用file:///user//xx//image.png的绝对路径 注:这样可以显示图片,但是如果在程序目录修改,图片就不能显示 方法二: 在html使用占位符,如:在 ...
- IOS延时加载网络图片
重网上下载图片是很慢的,为了不影响体验,选择延时加载图片是很好的办法. 一个tableView 列表,左边暂时没有图 - (UITableViewCell *)tableView:(UITab ...
- 基于Bootstrap的遮罩层,带有加载提示
1.body中的html <div class="modal fade" id="loadingModal"> <div style=&quo ...
- 前端页面给指定的div添加遮罩层,并且带有加载中的小旋转图片
话不多说,先上代码,其实还是比较简单的 $("<div id='shade' style='opacity:0.85;background:white'></div> ...
- ios UIImageView异步加载网络图片
方法1:在UI线程中同步加载网络图片 UIImageView *headview = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 40, 4 ...
- iOS网络加载图片缓存与SDWebImage
加载网络图片可以说是网络应用中必备的.如果单纯的去下载图片,而不去做多线程.缓存等技术去优化,加载图片时的效果与用户体验就会很差. 一.自己实现加载图片的方法 tips: *iOS中所有网络访问都是异 ...
- iOS图片加载框架-SDWebImage解读
在iOS的图片加载框架中,SDWebImage可谓是占据大半壁江山.它支持从网络中下载且缓存图片,并设置图片到对应的UIImageView控件或者UIButton控件.在项目中使用SDWebImage ...
- iOS 图片加载框架- SDWebImage 解读
在iOS的图片加载框架中,SDWebImage可谓是占据大半壁江山.它支持从网络中下载且缓存图片,并设置图片到对应的UIImageView控件或者UIButton控件.在项目中使用SDWebImage ...
随机推荐
- java微信开发API第一步 服务器接入
I如何接入服务器,下面就为大家进行介绍 一.说明 * 本示例根据微信开发文档:http://mp.weixin.qq.com/wiki/home/index.html最新版(4/3/2016 5:34 ...
- Quartz 2.2.x CronTrigger Tutorial
http://www.quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/crontrigger.html Introduction c ...
- 隐藏nginx 版本号信息
为了安全,想将http请求响应头里的nginx版本号信息隐藏掉: 1. nginx配置文件里增加 server_tokens off; server_tokens作用域是http server loc ...
- IOC性能对比
- Jmeter之JDBC Request使用方法(oracle)
JDBC Request: 这个sampler可以向数据库发送一个jdbc请求(sql语句),它经常需要和JDBC Connection Configuration 配置元件一起配合使用. 目录: 一 ...
- 导出Redis某个列表所有数据的语句
echo "smembers done:www.huaihua.gov.cn" | redis-cli -h 127.0.0.1 >> /home/dz/fkw.d ...
- 如何利用OCS缓存TomcatSession全局变量(转)
转: 首先非常感谢阿里云给我们提供了一个如此省事的平台. 我们公司是一家物流公司,主要提供运输和仓储的服务.我们现在正在把我们的系统往阿里云迁移.当然,还在迁移过程中,所以还有很多是没办法现在说得太清 ...
- Scala 深入浅出实战经典 第53讲:Scala中结构类型实战详解
王家林亲授<DT大数据梦工厂>大数据实战视频 Scala 深入浅出实战经典(1-64讲)完整视频.PPT.代码下载:百度云盘:http://pan.baidu.com/s/1c0noOt6 ...
- [转] jQuery对象与DOM对象之间的转换
http://wozailongyou.iteye.com/blog/299311 http://blog.allenm.me/2009/07/jquery%E4%B8%ADid%E5%92%8Cdo ...
- Openvswitch原理与代码分析(6):用户态流表flow table的操作
当内核无法查找到流表项的时候,则会通过upcall来调用用户态ovs-vswtichd中的flow table. 会调用ofproto-dpif-upcall.c中的udpif_upcall_hand ...