开发者

Mac OS X quick user switch in iOS

I want to flip a view like the Mac OS X user switch,i have used this code

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:myview cache:YES];
[myview removeFromSuperview];
[UIView commitAnimations];

But this flipping is different from mac os user switch, help 开发者_Python百科me if you can..This code provides different flip.


There is no built-in "cube rotate" in iOS. You'd need to create it yourself. There are several ways to do this. One way to approach it is to put both views into a single superview, and apply a CATransform3D transform to the "target" view to create the box. Then animate a CATransform3D for the entire superview to rotate it. When you're done, remove the old "source" view.

See the Core Animation Programming Guide, particularly Transforming a Layer's Geometry, for more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜