2011-08-27 146 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

如何添加視圖作爲一個子視圖定義當前視圖,然後將它的位置是當前可見的區域之外。之後,您可以設置動畫以更改您的子視圖位置以覆蓋當前視圖。