The new ios5 notification center will use this feature at the top of the screen when updating the notification.CubeThe effect of body scrolling is used as an update animation.
The original private method can be called for this effect.
Here we provide a non-private Implementation Method Based on quartzcore and coreanimation.
The preceding keywords include quartzcore, coreanimation, catransform3d, interpolation, and block, which must be sdk4.0 or later. For the source code project, see the attachment.
It contains a simple implementation but not a good call encapsulation. You can use it to encapsulate it as needed. My goal is to share the principles.
With the help of block, you can easily build a cakeyframeanimation. In addition, we can write the callback closure of the animation, which is really a huge block.
The implementation principle is actually relatively simple. The two sides to be rotated are layout based on the two sides of the cube to calculate the trajectory change catransform3d when the cube is rotated.
Cubedomaint.zip