【推荐】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 ...
随机推荐
- Lotus开发之Lotus Notes中域的验证
一:介绍 Lotus中的域主要有以下的类型:文本,日期/时间,对话框列表,复选框,单选按钮,RTF等等.Lotus中域的验证方式有很多种公式,lotusscript,javascript等 ...
- 使用 ContentProviderOperation 来提升性能
ContentProviders 是android 系统核心组件之一,ContentProviders 封装了数据的访问接口,其底层数据一般都是保存在数据库中或者保存在云端. 有时候你需要更新多行数 ...
- WPF 转义字符
下面是五个在XML文档中预定义好的实体: < < 小于号 > > 大于号 & & 和 ' ' 单引号 " " 双引号 实体 ...
- js实现hash
由于项目中用到了hash,自己实现了一个. Hash = function () { } Hash.prototype = { constructor: Hash, add: function (k, ...
- MyEclipse中拷贝J2EE项目,发布到tomcat中名字一样的解决办法
修改Eclipse工作空间下新拷贝项目下.settings文件夹中org.eclipse.wst.common.component的两个属性值. 为新项目名字: <?xml version=&q ...
- Linux环境的PHP执行
/usr/local/php5/bin/php -c /var/spool/php.ini -q /var/spool/auto.php
- 実行時にMicrosoft.ACE.OLEDB.12.0プロバイダーはローカルコンピュータに登録されていませんが出てしまう
環境 Windows8 64bit Visual Studio 2010 Access 2010 32bit 接続プロバイダは「Microsoft.ACE.OLEDB.12.0」 対応 Downloa ...
- VirtualBox的四种网络连接方式
VirtualBox中有4中网络连接方式:a. NAT 网络地址转换模式(Network Address Translation)b. Bridged ...
- 仿iReader切换皮肤进度条
仿iReader切换皮肤进度条 标签(空格分隔): 自定义View [TOC] 本以为使用paint.setXfermode(new PorterDuffXfermode(Mode.XOR));可以轻 ...
- 解决mac os x下 tomcat启动报 java.net.BindException: Permission denied <null>:80 错误
我在mac os x上启动tomcat的时候,报 java.net.BindException: Permission denied <null>:80,java.net.BindExce ...