1
我有下面的代碼,它在推送新的視圖控制器時做了很好的動畫。popViewController似乎不適用於UIView動畫
[UIView beginAnimations:@"animation" context:nil];
[UIView setAnimationDuration:0.5];
[[self navigationController] pushViewController:details animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
此代碼使用popViewController(而不是pushViewController)並不執行動畫。
[UIView beginAnimations:@"animationback" context:nil];
[UIView setAnimationDuration:0.5];
[[self navigationController] popViewControllerAnimated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
任何想法,爲什麼這將是和更重要的;我該如何解決它?
你是對的,但我有一個新問題。當它翻轉時,新視圖的彈出視圖位於翻轉過渡的兩側,如果你知道我的意思。有任何想法嗎? – qui 2010-09-03 14:01:31
這是CALayer的一個屬性 - 您可以將其設置爲單面。 – 2010-09-04 13:51:18