开发者

UIView animation transition between views

开发者 https://www.devze.com 2023-03-31 17:13 出处:网络
I need to make an animation that will come in from the right, displaying the new view. [UIView beginAnimations:nil context:nil];

I need to make an animation that will come in from the right, displaying the new view.

[UIView beginAnimations:nil context:nil];
        [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
        [UIView setAnimationDelay:.5f];
        [UIView setAnimationDuration:0.5f];

开发者_Go百科
// display view controller
[UIView commitAnimations];

What should I add here??


IF you have navigationController then use

NextViewcontroller *nextView = [NextViewcontroller alloc]initWithNibName@"NextViewcontroller"
bundle:nil];

[self.navigationController pushViewcontroller:nextView animated:YES];

[nextView release];


How about adding the view as a subView to your current view, then set its place to be outside the current visible area. After which you set your animation to change your subViews position to overlap the current view.

0

精彩评论

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

关注公众号