当我在导航中推动控制器时,我试图让基本的翻转动画过渡工作。下面的代码翻转视图,但是视图首先出现(每个元素淡入),然后发生翻转。是否可以使用 UINavigationController 制作翻转动画?
任何指针都会很棒,我为 Monotouch 找到的示例是在另一个视图内的视图上执行动画。
void ToolbarButtonClick()
{
InformationController controller = new InformationController();
NavigationController.PushViewController(controller,true);
}
public class InformationController : UIViewController
{
public override void ViewDidLoad ()
{
UIView.BeginAnimations("Flip");
UIView.SetAnimationDuration(1.0);
UIView.SetAnimationTransition(UIViewAnimationTransition.FlipFromRight,View,true);
base.ViewDidLoad ();
Title = "Information";
}
public override void ViewWillAppear (bool animated)
{
base.ViewWillAppear (animated);
}
public override void ViewDidAppear (bool animated)
{
base.ViewDidAppear (animated);
UIView.CommitAnimations();
}
}