ios PullToRefresh using animated GIF or image array or Vector image
说说那些令人惊叹的下拉效果
1. 动画下拉,这里借用一下github的资源
优点:直接用gif图处理,下拉进度完全按照gif图运行时间,只要时间和下拉进度匹配就可以了, 效果很流畅
https://dribbble.com/shots/1418440-Twisted-gif?list=searches&tag=animated_gif&offset=3
这里有大堆gif资源可供下载参考
项目地址:https://github.com/uzysjung/UzysAnimatedGifPullToRefresh
2.矢量图处理
项目参考地址:https://github.com/nicolastinkl/TKRefereshTableHeaderView
优点:通过gpu渲染而成,效果可想而知。使用时调节矢量图比较麻烦
3. 最常见的圆圈进度填满之类的效果
这种就比较简单。 直接通过UIView -DrawRect即可实现
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect
- {
- // Drawing code
- CGContextRef context = UIGraphicsGetCurrentContext();
- CGContextSetLineWidth(context, 1.0);
- CGContextSetLineCap(context, kCGLineCapRound);
- CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
- CGFloat startAngle = -M_PI/;
- CGFloat step = *M_PI/ * self.progress;
- CGContextAddArc(context, self.bounds.size.width/, self.bounds.size.height/, self.bounds.size.width/-, startAngle, startAngle+step, );
- CGContextStrokePath(context);
- }
ios PullToRefresh using animated GIF or image array or Vector image的更多相关文章
- C++中的数组array和vector,lambda表达式,C字符串加操作,C++中新类型数组(数组缓存),多元数组,new缓冲
使用C++风格的数组.不须要管理内存. array要注意不要溢出,由于它是栈上开辟内存. array适用于不论什么类型 #include<iostream> #include< ...
- 【译】Rust中的array、vector和slice
原文链接:https://hashrust.com/blog/arrays-vectors-and-slices-in-rust/ 原文标题:Arrays, vectors and slices in ...
- C++ 数组array与vector的比较
转:http://blog.csdn.net/yukin_xue/article/details/7391897 1. array 定义的时候必须定义数组的元素个数;而vector 不需要: 且只能包 ...
- essential c++ 第一章 array及vector相关使用
将对象初始化: 1.用等号(=)赋值运算符初始化,针对对象是内置类型或者对象可以单一值初始化 2.构造函数初始化,针对对象需要多个初始值的情况 单括号括住的字符表示字符常量(‘ ’): 第一个反斜线表 ...
- C++ Arrays, std::array, std::vector 总结
原文来自: https://shendrick.net/Coding%20Tips/2015/03/15/cpparrayvsvector.html @Seth Hendrick Original a ...
- 使用Olami SDK 语音控制一个支持HomeKit的智能家居的iOS程序
前言 HomeKit是苹果发布的智能家居平台.通过HomeKit组件,用户可以通过iphone.iPad和ipod Touch来控制智能灯泡,风扇.空调等支持HomeKit的智能家居,尤其是可以通过S ...
- 不通过App Store实现ios应用分发下载安装
最近公司的项目准备着手宣传工作了,宣传手册上要印制App的下载地址二维码,但是客户端应用还未上线,需要一种临时的方案解决应用分发下载问题,通常ios应用必须通过苹果应用商店才能下载安装,但是也可以看到 ...
- 不通过App Store,在iOS设备上直接安装应用程序(转)
今天在iOS设备上安装天翼云存储app,在safari上直接打开http://cloud.189.cn/wap/index.jsp,点击“点击免费安装”,如下图: 神奇的事情发生了,设备上直接下载ap ...
- [工作积累] 32bit to 64bit: array index underflow
先贴一段C++标准(ISO/IEC 14882:2003): 5.2.1 Subscripting: 1 A postfix expression followed by an expression ...
随机推荐
- 【VLFeat】使用matlab版本计算HOG
下载 vlfeat-0.9.18 http://www.vlfeat.org cd D:\program\vlfeat-0.9.18\toolbox
- 【转】RDO、SAD、SATD、λ
SAD(Sum of Absolute Difference)=SAE(Sum of Absolute Error)即绝对误差和 SATD(Sum of Absolute Transformed Di ...
- 【CSS】Intermediate2:Pseudo Classes
1.specify a state or relation to the selector selector:pseudo_class { property: value; } 2.Link 3.Dy ...
- 经典sql总结(1)
1.表示info 信息,字段为Id和res,如何得到如下结果
- bss段为什么要初始化,清除
我们都知道bss段需要初始化,但是这是为什么呢? 通过浏览资料,我们都会发现,bss段是不会出现在程序下载文件(*.bin *.hex)中的,因为全都是0.如果把它们出现在程序下载文件中,会增加程序下 ...
- 使用Hadoop打造私有云盘之API操作
项目介绍:使用hadoop实现云盘的增删读获取列表功能,hadoop不支持数据修改,特性是一次写入多次读取.主流的网盘也不支持该功能.今天我们用hdfs的FileSystem实现这些操作. 1.上传功 ...
- 高密度Java应用部署的一些实践
传统的Java应用部署模式,一般遵循“硬件->操作系统->JVM->Java应用”这种自底向上的部署结构,其中JEE应用可以细化为“硬件->操作系统->JVM->J ...
- tcpclient 类
1. 构造函数 1) 类对象将套接字与本地系统地址和一个随机的tcp端口号进行绑定. 在默认的tcpclient 对象创建后,必须使用connect方法与远程设备连接. TcpClient tc = ...
- A Tour of Go Structs
A struct is a collection of fields. (And a type declaration does what you'd expect.) package main im ...
- Unicode和字符集小结
博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:Unicode和字符集小结.