我有一个导航 Controller ,其中包含有关特定产品的详细信息,其中一个详细信息是产品的小图像。现在我想添加一个按钮,该按钮必须转到具有产品放大图像的 View Controller 。
如何使放大的图像与详细信息屏幕位于同一导航 Controller 上,并作为屏幕翻转的过渡,但标题和选项卡栏不会翻转。
在导航 Controller 上添加了两个 View 的概览图像。
最佳答案
你可以使用类似的东西:
UIView.Transition(this.NavigationController.View, 1f,
UIViewAnimationOptions.CurveEaseInOut | UIViewAnimationOptions.TransitionFlipFromRight,
delegate { this.NavigationController.PushViewController(this.ImageViewController, false); });
当按下导航 Controller 时, ImageView 会翻转,而不是默认的转换。 ImageViewController 的 title 属性应该与您的详细信息中的 title 属性相同。
UINavigationController
的想法是处理多个 Controller ,因此您不应该通过覆盖 View 来对抗它。
关于uiviewcontroller - 切换到另一个 View ,但保留在导航 Controller 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13681221/