How can i add more than 10 buttons on a navigationbar in iphone application development?(如何在 iphone 应用程序开发中的导航栏上添加 10 多个按钮?)
问题描述
在我的应用程序中,我必须在导航栏上添加 8 个按钮.所以这些按钮应该在视图中并且应该有一个上一个和下一个按钮是非常正常的.当我按下下一个按钮然后使用动画时,它将显示下一个按钮,这些按钮不在视图中并且与上一个按钮相同.
详情:
UINavigation Bar -> leftBaritem[上一个按钮] + view + rightBaritem[下一个按钮];
视图将包含 8 个按钮.如果我再解释一下,它应该是这样的:
<块引用>
上一个 + |一个 |乙|C |D |E |F |克|H + 下一个
我什么时候按
<块引用>下一个
然后它会显示如下:
<块引用>上一个 + |乙|C |D |E |F |克|H + 下一个
喜欢这个
<块引用>上一页
按钮.
在这张图片中,一个视图中有三个按钮,但我有六个按钮可以添加到仪表板、订单、产品"视图上.现在当我按下>"或<"时或左/右栏项目,然后它将显示导航栏的按钮,这些按钮不在视图中.
我解决这个问题的方式略有不同......
在 viewDidLoad
我有一个 scrollView
并调用了我的函数
然后在我的 function
中,我创建了我的菜单 buttons
,它看起来像 navigation bar
它解决了...快乐编码... :))
In my application I have to add 8 buttons on a navigation bar..So it's very much normal that these button should be in a view and there should be one previous and next button. When i will press the next button then using animation it will show the next buttons whose are out of the view and same as for previous button.
For Details:
UINavigation Bar -> leftBaritem[previous button] + view + rightBaritem[next button];
view will contain 8 buttons. If I explain again then it should be look like this:
Previous + | A | B | C | D | E | F | G | H + next
when I will press
next
then it will show like this:
previous + | B | C | D | E | F | G | H + next
like this for
previous
button.
EDIT:
In this picture there are three button in a view but i have six button to add on the view "Dashbord , order , Product". Now when i will press ">" or "<" or left/right bar items then it will show the buttons of the nav bar which are out of the view.
I have solve this problem slightly different way....
In viewDidLoad
I have take a scrollView
and called my function
Then in my function
i have created my menu buttons
which will be look like buttons on a navigation bar
and it solves...Happy Coding... :))
这篇关于如何在 iphone 应用程序开发中的导航栏上添加 10 多个按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!