UIView的表面自定义转换/动画(如“水滴效应”) [英] UIView surface custom transformation/animation (like 'a water drop effect')

查看:378
本文介绍了UIView的表面自定义转换/动画(如“水滴效应”)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是贯彻落实自定义转换(+动画)在查看表面的方式(类似附图片)( 视图边界)。

What is the way to implement custom transformation (+ animation) on a view surface (similar to the images attached) (not just the view bounds).

问题主要是在什么是通用方式,以做到这一点(不完全的'水滴效应,但任何例子是pciated肯定AP $ P $)。我想,这就是网格的布局层一些'algorythmic改造,但不知道哪种方式'挖',在

The question is mainly in what is the general way to do that (not exactly the 'water drop effect', but any examples would be appreciated for sure). I guess, that's some 'algorythmic' transformation of the layer layout 'grid', but not sure which way to 'dig' that in.

(另一种想法是,可能会使用一些框架,但是可以实现,我仍然需要理解的核心逻辑)。

(Another thought is that might be achieved with using some frameworks, however, I would still need to understand the core logic).

感谢您!


推荐答案

阅读巴尔托什Ciechanowski这个优秀的博客文章:

Read this excellent blog post by Bartosz Ciechanowski:

<一个href=\"http://ciechanowski.me/blog/2014/05/14/mesh-transforms/\">http://ciechanowski.me/blog/2014/05/14/mesh-transforms/

要包起来:苹果做到这一点绕了一个名为CAMeshTransform类中的私有API。

To wrap it up: Apple does this with private API around a class called 'CAMeshTransform'.

笔者提出了一个自己编写的替代品:

The author proposes an self-written substitute:

<一个href=\"https://github.com/Ciechan/BCMeshTransformView\">https://github.com/Ciechan/BCMeshTransformView

这是pretty居然惊人!

It's pretty amazing actually!

这篇关于UIView的表面自定义转换/动画(如“水滴效应”)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆