2009-06-30 52 views
0

我有一個動畫塊,在iPhone OS 2.2上運行應用程序時工作正常。現在我編譯相同的代碼爲iPhone OS 3.0,它不起作用。uiview動畫用於在iPhone SDK 2.2上工作,現在它不在SDK 3.0上

UIViewAnimationTransition trans = UIViewAnimationTransitionFlipFromLeft; 

[UIView beginAnimations: nil context: NULL]; 
UIView *forview = [[self view] superview]; 
[UIView setAnimationTransition: trans forView:forview cache: YES]; 
[UIView setAnimationDuration:1.0]; 

[[self navigationController] popViewControllerAnimated:NO]; 

[UIView commitAnimations]; 

這段代碼的功能,它使用導航控制器改變最頂部的視圖,但隨着翻動過渡,而不是與內置的一個。

關於什麼可能在sdk中發生變化或我做錯了什麼想法?

謝謝!!

回答

0

這不是直接回答你的問題,但是這取決於你爲什麼這樣做,有可能通過使用presentModalViewController:animated:UIModalTransitionStyleFlipHorizontal一個modalTransitionStyle實現後,你的效果。

+0

感謝您的回答,但那不是我所需要的。無論如何,我通過appDelegate訪問視圖來解決問題,而不是使用[[self view] superview]方法。 – nico 2009-07-03 17:34:38

相關問題