开发者

Mac OS X quick user switch in iOS

开发者 https://www.devze.com 2023-02-17 11:02 出处:网络
I want to flip a view like the Mac OS X user switch,i have used this code [UIView beginAnimations:nil context:nil];

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

精彩评论

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

关注公众号