我是 iOS 开发的新手.到目前为止我所做的如下.
I am newbie for iOS development. What I have done so far is as below.
ViewControllerScrollViewScrollViewTab BarTab Bar中拖拽了7个Tab Bar Item.ScrollView in ViewControllerTab Bar in ScrollViewTab Bar Item in Tab Bar.现在,当我执行这个项目时,屏幕上的所有 7 个选项卡都看起来不太好.所以我计划首先只显示 4 个选项卡,如果用户水平滚动它,用户可以滚动并查看其他选项卡.
Now when I execute this project, I have all 7 tabs on screen which is not looking good. So what I am planning is display only 4 tab at first and if user scroll it horizontally, user can scroll and see rest tabs.
所以,我想要实现的是以编程方式在 ScrollView 中设置一些参数,它只会显示前 4 个选项.
So, what I want to achieve is programmatically set some parameter in ScrollView that it will display only first 4 options only.
对此有什么想法/建议吗?
Any idea/ suggestion on this to be done?
我认为这个可能更适合这种情况.与 KLHorizontalSelect 相反,它有点旧(一年没有在 master 分支上提交?)而且我没有使用它的经验,但它可能会解决你的问题:InfiniTabBar.
I think this one may be even more adapted to the situation. Contrary to KLHorizontalSelect, it's kind of old (no commit on the master branch for a year ?) and I have no experience with it, but it may solve your problem : InfiniTabBar.
描述很短:
带有无限项空间的滚动标签栏
A scrolling tab bar with space for infinite items
<小时>
也许你可以看看这个控件:KLHorizontalSelect.
它是这样的:
我不认为它看起来完全符合您的要求,但我认为它工作原理几乎符合您的预期.也许你可以从事设计工作?
I don't think it looks exactly as you want, but I think it works almost as what you're expecting. Maybe you can work on the design ?
这篇关于显示所有带有滚动选项的标签(屏幕上应该只有 4 个标签)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
UIScrollView 底部的 UIButtons 不起作用UIButtons at the bottom of UIScrollView not working(UIScrollView 底部的 UIButtons 不起作用)
scrollViewWillEndDragging:withVelocity:targetContentOffset: 不scrollViewWillEndDragging:withVelocity:targetContentOffset: not working on the edges of a UISCrollView(scrollViewWillEndDragging:withVelocity:targetCon
向下滚动时 ImageView 缩放ImageView Scaling when scrolling down(向下滚动时 ImageView 缩放)
UIScrollView 上的边界自动更改,带有内容插图Bounds automatically changes on UIScrollView with content insets(UIScrollView 上的边界自动更改,带有内容插图)
用于 UIScrollView 的 iOS5 UITapRecognizer 干扰按钮.怎么iOS5 UITapRecognizer for UIScrollView interfering with buttons. How to fix?(用于 UIScrollView 的 iOS5 UITapRecognizer 干扰按钮.怎么修?)
使用(自定义、交互式)视图控制器呈现和解除处理Handling scroll views with (custom, interactive) view controller presentation and dismissal(使用(自定义、交互式)视图控制器呈现和解除处