pushviewcontrolleranimation没有实际调用pushviewcontroller

我想animation我的视图响应用户操作看起来像pushviewcontroller的animation。 也就是说,我希望视图在屏幕左侧滑动,以响应用户的操作。 但是,我不想创build一个新的视图,并使用pushviewcontroller推到堆栈上。 我想重复使用相同的视图并重新加载数据,我希望重新加载的视图与新的数据从右侧滑入,并且在pushviewcontroller的animation中。 你会怎么做?

谢谢你的帮助!

在viewController中执行此操作。 这会将整个视图向右移动,然后在2秒钟之后移动。 你可能只想移动一个子视图,所以你有某种背景。

- (void)viewDidAppear:(BOOL)animated { [UIView animateWithDuration:1.2 animations:^{ self.view.frame = CGRectMake(320, 0, 320, 480); }]; [self performSelector:@selector(slideBackView) withObject:nil afterDelay:2.0]; } - (void)slideBackView { [UIView animateWithDuration:1.2 animations:^{ self.view.frame = CGRectMake(0, 0, 320, 480); }]; } 

你可以animation你的UIView,请看下面的SOpost..

iPhone UIViewanimation最佳实践

这里是更多的链接..

http://ameyashetti.wordpress.com/2009/08/17/view-animation-tutorial/