How to perform kCATransitionPush animation without any transparency / fade effects [duplicate]

前提是你 提交于 2019-12-05 05:54:09
logancautrell

The simplest method is to simply use UIView beginAnimations/commitAnimations block. You can adjust the duration and curve by reviewing the docs.

{   
    // Adjust for orientation as necessary.
    view.frame = CGRectMake(0,
                        -480, 
                        320,
                        480);

    [UIView beginAnimations:nil context:nil];

    view.frame = CGRectMake(view.frame.origin.x,
                        0, 
                        view.frame.size.width,
                        view.frame.size.height);

    [UIView commitAnimations];
}

Docs here:

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIView_Class/UIView/UIView.html

Instead of the CATransition, you could instead try using a CABasicAnimation that animates the position from off the top of the screen into the desired position.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!