Is possible to scroll an UITabBar?

你离开我真会死。 提交于 2019-12-31 07:24:10

问题


I've downloaded an Download Manager from App Store and noticed that the app scrolls an UITabBar,like: When the user press a button the bar walks left and show other option to the user.Is that really possible and does Apple accept these type of customization in UITabBar?If it's possible how can i do that,please provide some sample code or reference.


回答1:


Yes, possible. but not using usual UITabbar. you have to create custom tabbar that behave the same. there are projects out there that you can use, save a lot of time of your work.

infinitetabbar : A scrolling tab bar with space for infinite items

jsscrollabletabbar : JSScrollableTabBar is a simple, refined tab bar UI control that resembles the TabStrip found in the popular Three20 library but without any of the dependencies.




回答2:


It is probably a custom-made control (a scroll view with a few child buttons). It's perfectly acceptable at the Store if you don't use any undocumented functions.




回答3:


Yes, you can implement scrollable tabbar using UITabBar. Adobe writer maybe thought about using only UITabBar, so he mentioned it can't be implemented, but if you use ScrollView and UITabBar, it can be implemented. Put tabbar on scrollview, scrollview size is 320,460 (it excludes status bar size). TabBar size is any size you want, scrollview contentsize must be equal to tabbar size.



来源:https://stackoverflow.com/questions/9642386/is-possible-to-scroll-an-uitabbar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!