[翻译] MotionBlur
MotionBlur
https://github.com/fastred/MotionBlur
MotionBlur
allows you to add motion blur effect to your animations (currently only position's change). See the accompanying blog post to learn how it's implemented.
MotionBlur允许你添加动态模糊特效(目前只支持位移变化).你可以看这篇博文来看看是怎么实现的.
Note how the text and icons on the menu get blurred when it slides in and out.
注意看,这个文字以及图片会在滑入或者滑出的时候变得模糊了.
Usage
First, import it with:
首先,导入头文件:
#import "UIView+MotionBlur.h"
then use it with:
然后这么用:
[yourView enableBlurWithAngle:M_PI_2 completion:^{[UIView animateWithDuration:0.5delay:0 usingSpringWithDamping:0.8 initialSpringVelocity:0.3 options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionBeginFromCurrentState animations:^{ CGRect f = yourView.frame; f.origin = CGPointMake(0, 300); yourView.frame = f; } completion:^(BOOL finished) { [yourView disableBlur]; }]; }];
Snapshot and blur are computed before the animation, that's why the API is asynchronous. You should also see the example project and read comments in the header file:Classes/UIView+MotionBlur.h
.
截图以及模糊会在动画执行前就计算好了.所以,这是这个API为什么是异步的.你可以查看头文件来了解详情.
Demo
To run the example project; clone the repo and open Example/MotionBlur.xcodeproj
.
Requirements
- iOS 8 and above
Installation
MotionBlur is available through CocoaPods. To install it, simply add the following line to your Podfile:
MotionBlur支持CocoaPods.
pod "MotionBlur"
Author
Arkadiusz Holko:
- Blog
- @arekholko on Twitter
转载于:https://www.cnblogs.com/YouXianMing/p/4579202.html
[翻译] MotionBlur相关推荐
- Mysql函数group_concat、find_in_set 多值分隔字符字段进行数据库字段值翻译
Mysql函数group_concat.find_in_set进行数据库字段值翻译 场景 配方表:记录包含的原料 sources表示原料,字段值之间用逗号分隔 原料表:对应原料id和原料名称 现需要查 ...
- “Attention is All You Need 翻译
<p><img src="output_0_0.png" alt="png"></p> "Attention is ...
- 基于PyTorch的Seq2Seq翻译模型详细注释介绍(一)
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/qysh123/article/deta ...
- 全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning
全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样 ...
- 全文翻译(四) TVM An Automated End-to-End Optimizing Compiler
全文翻译(四) TVM An Automated End-to-End Optimizing Compiler 6.3 嵌入式GPU评估 对于移动GPU实验,在配备ARM Mali-T860MP4 G ...
- 全文翻译(三) TVM An Automated End-to-End Optimizing Compiler
全文翻译(三) TVM An Automated End-to-End Optimizing Compiler 5. 自动化优化 考虑到一组丰富的调度原语,剩下的问题是为DL模型的每一层,找到最佳的算 ...
- 全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning
全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 3.优化计算图 计算图是在DL框架中表示程序的常 ...
- 全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning
全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样的硬件 ...
- YOLOv4全文阅读(全文中文翻译)
YOLOv4全文阅读(全文中文翻译) YOLOv4: Optimal Speed and Accuracy of Object Detection 论文链接: https://arxiv.org/pd ...
最新文章
- 嵌入式系统学习笔记之五-- uboot常用命令 环境变量
- navicat 导入csv未响应_使用navicat将csv文件导入mysql
- Ubuntu18.04下安装NFS详细步骤
- 小程序 const moment = require('moment')_C++大作业-XXX管理程序
- 通用分页查询存储过程
- JavaScript之jQuery够用即可(each循环、位置偏移量和大小、克隆外层标签、嵌套返回顶部、集体绑定事件)
- Python进阶(六)文件操作
- matlab 求导的一个简单程序
- 层次分析法、网络层次分析法、模煳层次分析法、双基点法
- 勘测定界坐标交换格式文本文件转换成 shapefile 格式
- Android 音乐播放器的开发教程(六)service的运用及音乐列表点击播放 ----- 小达
- 工作流调度系统Apache DolphinScheduler介绍和设计原理
- 仓库库存表的三种设计方式
- 粉尘对计算机影响,粉尘对车间设备和产品影响有多大
- 使用 Roslyn 分析代码注释,给 TODO 类型的注释添加负责人、截止日期和 issue 链接跟踪
- LOJ 6485 LJJ学多项式
- 平衡二叉搜索树查找的时间复杂度为什么是O(log n)?
- 2020年A证(安全员)考试试卷及A证(安全员)多少钱
- 免费在线文件转换器Convertio
- Dart plugin not installed; this adds Dart specific functionality. Flutter plugin not installed;
热门文章
- 数据结构设计_撮合引擎开发:数据结构设计
- linux内核dma内存分配,Linux 4.x 内核空间 DMA 虚拟内存地址
- 12面魔方公式图解法_【高级篇】(三)三阶魔方CFOP高级玩法之——F2L
- gpu云服务器运行游戏_在滴滴云 GPU 服务器上使用NVIDIA NGX环境搭建
- kafaka使用 消息队列_Java使用消息队列还是直接使用线程池ExecutorService异步处理?...
- django报错is not a registered tag library. Must be one of
- oracle改用户名名字,Oracle中如何更改用户名
- nc65语义模型设计_完整word版,NC数据加工做语义模型
- C++知识点33——使用C++标准库(无序关联容器unordered_(multi)map,unordered_(multi)set)
- ViSP中识别AprilTag的C++实例代码解释