作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我将 Controller 插入导航中时,我试图让基本的翻转动画过渡正常工作。下面的代码翻转 View ,但是 View 首先出现(每个元素淡入),然后翻转发生。是否可以使用 UINavigationController 制作翻转动画?
任何指针都很好,我为 Monotouch 找到的示例是在另一个 View 内的 View 上执行动画。
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();
}
}
最佳答案
我在那里,但 View 需要从 NavigationController
中获取:
// Push the controller first or the Title doesn't animate
NavigationController.PushViewController(controller,false);
UIView.BeginAnimations(null,IntPtr.Zero);
UIView.SetAnimationDuration(1);
UIView.SetAnimationTransition(UIViewAnimationTransition.FlipFromLeft,
NavigationController.View,true);
UIView.CommitAnimations();
关于uiview - BeginAnimations 和 CommitAnimations with NavigationController.PushViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2532932/
我正在制作 ScrollView 内容插图的动画,以便下拉刷新。 NSLog(@" in main thread? %d", [NSThread isMainThread]); // prints 1
当我将 Controller 插入导航中时,我试图让基本的翻转动画过渡正常工作。下面的代码翻转 View ,但是 View 首先出现(每个元素淡入),然后翻转发生。是否可以使用 UINavigatio
我正在开发一个Cocos2D游戏。在舞台上显示一个 UIView,为用户提供要执行的任务列表。我使用动画上下移动一些文本字段。我的代码如下。 [textField setFrame:C
我是一名优秀的程序员,十分优秀!