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相关推荐

  1. Mysql函数group_concat、find_in_set 多值分隔字符字段进行数据库字段值翻译

    Mysql函数group_concat.find_in_set进行数据库字段值翻译 场景 配方表:记录包含的原料 sources表示原料,字段值之间用逗号分隔 原料表:对应原料id和原料名称 现需要查 ...

  2. “Attention is All You Need 翻译

    <p><img src="output_0_0.png" alt="png"></p> "Attention is ...

  3. 基于PyTorch的Seq2Seq翻译模型详细注释介绍(一)

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/qysh123/article/deta ...

  4. 全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

    全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样 ...

  5. 全文翻译(四) TVM An Automated End-to-End Optimizing Compiler

    全文翻译(四) TVM An Automated End-to-End Optimizing Compiler 6.3 嵌入式GPU评估 对于移动GPU实验,在配备ARM Mali-T860MP4 G ...

  6. 全文翻译(三) TVM An Automated End-to-End Optimizing Compiler

    全文翻译(三) TVM An Automated End-to-End Optimizing Compiler 5. 自动化优化 考虑到一组丰富的调度原语,剩下的问题是为DL模型的每一层,找到最佳的算 ...

  7. 全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

    全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 3.优化计算图 计算图是在DL框架中表示程序的常 ...

  8. 全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

    全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样的硬件 ...

  9. YOLOv4全文阅读(全文中文翻译)

    YOLOv4全文阅读(全文中文翻译) YOLOv4: Optimal Speed and Accuracy of Object Detection 论文链接: https://arxiv.org/pd ...

最新文章

  1. 嵌入式系统学习笔记之五-- uboot常用命令 环境变量
  2. navicat 导入csv未响应_使用navicat将csv文件导入mysql
  3. Ubuntu18.04下安装NFS详细步骤
  4. 小程序 const moment = require('moment')_C++大作业-XXX管理程序
  5. 通用分页查询存储过程
  6. JavaScript之jQuery够用即可(each循环、位置偏移量和大小、克隆外层标签、嵌套返回顶部、集体绑定事件)
  7. Python进阶(六)文件操作
  8. matlab 求导的一个简单程序
  9. 层次分析法、网络层次分析法、模煳层次分析法、双基点法
  10. 勘测定界坐标交换格式文本文件转换成 shapefile 格式
  11. Android 音乐播放器的开发教程(六)service的运用及音乐列表点击播放 ----- 小达
  12. 工作流调度系统Apache DolphinScheduler介绍和设计原理
  13. 仓库库存表的三种设计方式
  14. 粉尘对计算机影响,粉尘对车间设备和产品影响有多大
  15. 使用 Roslyn 分析代码注释,给 TODO 类型的注释添加负责人、截止日期和 issue 链接跟踪
  16. LOJ 6485 LJJ学多项式
  17. 平衡二叉搜索树查找的时间复杂度为什么是O(log n)?
  18. 2020年A证(安全员)考试试卷及A证(安全员)多少钱
  19. 免费在线文件转换器Convertio
  20. Dart plugin not installed; this adds Dart specific functionality. Flutter plugin not installed;

热门文章

  1. 数据结构设计_撮合引擎开发:数据结构设计
  2. linux内核dma内存分配,Linux 4.x 内核空间 DMA 虚拟内存地址
  3. 12面魔方公式图解法_【高级篇】(三)三阶魔方CFOP高级玩法之——F2L
  4. gpu云服务器运行游戏_在滴滴云 GPU 服务器上使用NVIDIA NGX环境搭建
  5. kafaka使用 消息队列_Java使用消息队列还是直接使用线程池ExecutorService异步处理?...
  6. django报错is not a registered tag library. Must be one of
  7. oracle改用户名名字,Oracle中如何更改用户名
  8. nc65语义模型设计_完整word版,NC数据加工做语义模型
  9. C++知识点33——使用C++标准库(无序关联容器unordered_(multi)map,unordered_(multi)set)
  10. ViSP中识别AprilTag的C++实例代码解释