0

I have a view controller which extends ButtonBarPagerTabStripViewController and there are 9 tabs to be displayed in the ButtonBarView. I'm wondering if it's possible to disable the horizontal scrolling and make it into 3 tabs per row with 3 rows in total being shown.

I've looked into its documentation and source codes on GitHub and tag on StackOverflow but couldn't find any solutions to it.

XLPagerTabStrip GitHub

Any help is much appreciated. Thanks in advance!

Issue: Scrollable Tabs

Trying to achieve: Multi-row tabs

Angeline
  • 46
  • 1
  • 7

1 Answers1

1

In my opinion, you can create the menu with tabs by own using collectionView and hide the default menu of 'xlpagertabstrip' library. You just use the only paging feature of this library and create the top menu using collectionView.

I did this by this way as I explained and using this library: https://github.com/PageMenu/PageMenu (Awesome library)

nitin.agam
  • 1,949
  • 1
  • 17
  • 24
  • Thanks for your input! :) I've tried your way but unfortunately it was quite a bit of work. I managed to make it multi-row by overriding its UICollectionView's default scroll direction and set to vertical. From there, I adjusted the cell's height and width via sizeForItemAtIndexPath method. That's all is needed to achieve it :) – Angeline Nov 25 '18 at 15:24
  • Good to hear that you achieve it !! – nitin.agam Nov 26 '18 at 06:55