Making the tab bar scrollable in iphone?

后端 未结 3 1673
情歌与酒
情歌与酒 2020-12-17 01:31

I have an Iphone application in which I had 10 tab items in the tab bar.

I don\'t want to add the more button behaviour of the tab bar here.

Instead of that

相关标签:
3条回答
  • 2020-12-17 01:31

    1) define UIScrollview *scrollview
    2) drag and drop scroll view
    3) connect instance and delegate in xib
    4) set frame of scrollview more so it is scrollable and more than view size
    5) add uitabbar as subview to scrollview

    [uitabar instance addsubview:scrollview];
    
    0 讨论(0)
  • 2020-12-17 01:45

    But You can not use the UITabbar. You need to create custom UITabbar that behave the same.

    Here are links of some projects will help you more.

    1. Infinte Tab Bar
    2. Scrollable Tab Bar
    0 讨论(0)
  • 2020-12-17 01:56

    Have you tried looking here? How to make a horizontal scrollable UITabBar in iOS?

    Although, and this is the reason im not writing a comment, i would not use a scrollview, as described in the accepted answer. Instead, i would go for a uipickerview, and rotate it 90 degrees using CGAffineTransformRotate. Let me know if this works.

    0 讨论(0)
提交回复
热议问题