the paper folding/unfolding effect in twitter for iPad

前端 未结 3 714
独厮守ぢ
独厮守ぢ 2020-12-07 08:09

Twitter for iPad implements a fancy \"pinch to expand paper fold\" effect. A short video clip here. http://www.youtube.com/watch?v=B0TuPsNJ-XY

Can this be done with

3条回答
  •  萌比男神i
    2020-12-07 08:41

    The effect is basically just a view rotating about the X axis: when you drag a tweet out of the list, there's a view that starts out parallel to the X-Z plane. As the user un-pinches, the view rotates around the X axis until it comes fully into the X-Y plane. The documentation says:

    The CATransform3D data structure defines a homogenous three-dimensional transform (a 4 by 4 matrix of CGFloat values) that is used to rotate, scale, offset, skew, and apply perspective transformations to a layer.

    Furthermore, we know that CALayer's transform property is a CATransform3D structure, and that it's also animatable. Ergo, I think it's safe to say that the folding effect in question is do-able with Core Animation.

提交回复
热议问题