拇指向下的NavigationController - 左视图和右视图从rootViewController 滚动?
我是来自 Turkiye 的新手 ios 开发人员。所以请原谅我的英语。 我想了解如何在 NavigationController 上做到这一点?
****LeftSideControllerView -----RootControllerView-----RightSideControllerView****
我想要这样的滚动吗?这不可能吗?我该怎么办?
I am newbie ios developer from Turkiye. So excuse me for my eng.
I want to learn how can do this on NavigationController?
****LeftSideControllerView -----RootControllerView-----RightSideControllerView****
I want scroll like this? is it impossible? how should I do??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以通过以下方式做到这一点。
1.使用LeftSideControllerView创建一个NavigationController。
2.创建中心视图控制器并将其推送到导航控制器(不带动画)。
这里的 SecondViewController 是您在问题中指定的 RootControllerView 。
3.从 SecondViewController 中,您可以推送 RightSideControllerView。
这是一种方法,但可能不是正确的方法。
You can do that in the following way.
1.Create a NavigationController with LeftSideControllerView.
2.Create the Center View Controller and push it to the navigation controller (without the animation).
Here SecondViewController is the RootControllerView you specified in your question.
3.From the SecondViewController you can push the RightSideControllerView.
This is one way of doing it, but may not be the right way of doing it.
一种方法是使用宽度为屏幕三倍的 UIScrollView,并启用分页,因此感觉就像主屏幕。然后在 UISCrollView 的每个段中拥有三个 UIView,分别对应于 LeftSideControllerView、MiddleControllerView 和 RightSideControllerView。注意:您可能必须为中间新建一个新的,因为 RooControllerView 将处理大的 UIScrollView。
One way of doing it would be having a UIScrollView with a width of three times the screen, and enable paging, so it feels like the homescreen. Then have three UIViews in each segment of the UISCrollView which correspond to LeftSideControllerView, MiddleControllerView, and RightSideControllerView. Note: You may have to make a new new for the middle, because the RooControllerView will handle the large UIScrollView.
NAvigation 将因此视图中只有一个视图控制器。它总是从根视图控制器开始。
执行场景的一种方法是将 LeftViewController 设置为 RootViewController。在下一行中推送第二个视图控制器,您希望在开始时将其作为可见视图控制器。然后在需要时按下 Rightviewconteoller。要使左视图控制器使用 poptorootviewcontroller 方法。
第二种方法是使用动画编号属性推动 Leftviewcontroller。
[[self navigationController] PushViewController:Leftviewcontroller 动画:NO];
使用您的自定义动画,例如 leftviewcontroller 从左侧移动。
NAvigation will so only one view controller in the view. It always starts with Root View Controller.
One way for doing your scenario is make the LeftViewController as RootViewController.in the next line push the secondviewcontroller which u like to have as a visible viewcontroller at the begining. then push the Rightviewconteoller whenever u need. To make the left viewcontroller use poptorootviewcontroller method.
the second way is Push the Leftviewcontroller by using the property animated no.
[[self navigationController] pushViewController:Leftviewcontroller animated:NO];
use ur custom animation like leftviewcontroller moves from the left.