天天看点

MotionBlur

motionblur

MotionBlur

<a href="https://github.com/fastred/motionblur" target="_blank">https://github.com/fastred/motionblur</a>

MotionBlur

note how the text and icons on the menu get blurred when it slides in and out.

注意看,这个文字以及图片会在滑入或者滑出的时候变得模糊了.

usage

first, import it with:

首先,导入头文件:

then use it with:

然后这么用:

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:<code>classes/uiview+motionblur.h</code>.

截图以及模糊会在动画执行前就计算好了.所以,这是这个api为什么是异步的.你可以查看头文件来了解详情.

demo

to run the example project; clone the repo and open <code>example/motionblur.xcodeproj</code>.

requirements

ios 8 and above

installation

motionblur is available through cocoapods. to install it, simply add the following line to your podfile:

motionblur支持cocoapods.

author

arkadiusz holko:

<a href="http://holko.pl/">blog</a>

<a href="https://twitter.com/arekholko">@arekholko on twitter</a>

继续阅读