Is possible to scroll an UITabBar?

2019-03-06 02:17发布

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.

3条回答
做个烂人
2楼-- · 2019-03-06 02:23

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.

查看更多
我命由我不由天
3楼-- · 2019-03-06 02:26

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.

查看更多
Root(大扎)
4楼-- · 2019-03-06 02:39

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.

查看更多
登录 后发表回答