2011-08-27 104 views
0

我需要制作一个将从右侧进入的动画,显示新视图。UIView视图之间的动画过渡

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


// display view controller 
[UIView commitAnimations]; 

我应该在这里添加什么?

+0

提供更多详细信息... – iProgrammer

+0

如何让另一个视图从右侧滑入? –

回答

1

如果你有navigationController然后使用

NextViewcontroller *nextView = [NextViewcontroller alloc][email protected]"NextViewcontroller" 
bundle:nil]; 

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

[nextView release]; 
+0

但如果我不?)我有基于视图的应用程序) –

0

如何添加视图作为一个子视图定义当前视图,然后将它的位置是当前可见的区域之外。之后,您可以设置动画以更改您的子视图位置以覆盖当前视图。