是否有在导航栏添加相同的滚动菜单栏?
我已经再次发布了我的这个问题,但我还没有得到完美的答案。在这里我将再次解释我的问题,这对我来说非常重要,所以不惜一切代价我必须解决它。现在我的问题是。 ..
假设,我在 tabbarController
中有 4 个 tabbaritem
和项目“仪表板”,“订单”,“产品”,“客户”。
这些选项卡栏的每个项目都调用各自的uiviewcontroller
。
仪表板调用“DashboarViewController”;
订单调用“orderViewController”;
产品调用“ProductViewController”;
客户调用“CustomerViewController”;
现在,我必须在每个 uiviewcontroller 上设置一个滚动菜单栏,并且该菜单栏包含 4 个按钮。这些按钮名称与选项卡栏项目名称“仪表板”、“订单”、“产品”、“客户”相同。
现在,当我按下菜单栏的按钮时,相应的控制器将显示与选项卡栏项目相同的内容。假设我按下“order”选项卡项,那么它将显示“orderviewcontroller”。当我看到这个视图控制器时,它还会向我显示视图控制器顶部的菜单栏。现在,如果我单击此“orderviewcontroller”中的“产品”按钮,那么它将发送回给我“productViewcontroller”。
这意味着选项卡栏项目和滚动菜单栏的按钮将工作相同。
现在我仍然完成了这些,我之前的帖子图片 如何在多个视图控制器中制作相同的按钮?< /a>
如果有人知道如何做到这一点,请逐步解释。我不需要提供您的任何代码。只需逐步解释一下,在阅读我之前的文章后,我该如何做到这一点,
提前致谢。
I have already posted my this problem another time but i have not got my answer perfectly.Here i am going to explain my problem another time, it is very important for me so at any cost i have to solve it.Now my problem is...
Suppose, I have 4 tabbaritem
in a tabbarController
and items "dashboard","order","product","customer".
every item of these tabbar is a calling there respective uiviewcontroller
.
dashboar calling "DashboarViewController";
order calling "orderViewController";
product calling "ProductViewController";
customer calling "CustomerViewController";
Now, i have to set a scrolling menubar at every uiviewcontroller and this menu bar containing 4 buttons. These button names are same as tabbar items name "dashboard","order","product","customer".
Now when i press the button of the menu bar then respective controller will show same as for tabbar items. suppose i am pressing "order" tabbar item then it will show the "orderviewcontroller". when i will see this view controller it will also show me that menu bar at the top of the viewcontroller.Now, if i am click "product" button in this "orderviewcontroller" then it will sent back to me "productViewcontroller".
thats mean tabbar item and button of the scroll menubar will work same.
still now i have done these, my previous post image
How can i make same button in multiple view controller?
If some know how can do that then please explain it step by step.I do not need to give any code from you.just explain it step by step how can i do that after reading my previous post
Thanks In Advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哈哈哈.....当我解决它时真是太有趣了。无论我以不同的方式解决这个问题,我都没有使用滚动视图按钮控制器作为控制器,在每个控制器中我都对按钮中的按钮进行了功能滚动视图创建和按钮操作我刚刚更改了选项卡栏控制器的选定索引。
在
-(void)viewDidload
我写了这段代码,这里是按钮创建和操作
Ha ha ha .....it was so much fun when i solved it.whatever i solved this problem in different way, i did not use scrollview button controller for controller just, in every controller i have made function to where buttons within a scrollview create and on action of button i have just change the selected index of the tabbar controller.
in
-(void)viewDidload
i wrote this codehere is the button create and action