1

am using https://github.com/xmartlabs/XLPagerTabStrip in my app .. and its work just fine as i need .. i had 5 children in the buttonbar .. and my app is in Arabic RTL language ... the tab will be like this:

enter image description here

which is the right way to be ..

i have just added the sixth child and it got messed up .. like this:

enter image description here

how to solve this and make it RTL as it was? also is there is a way to make the tabs scrollable so it will not be so crowded and messed up like this?

Liftoff
  • 24,717
  • 13
  • 66
  • 119
Lama
  • 255
  • 3
  • 17

1 Answers1

0

To get the needed behavior, one must the following:

  1. Set the semantic property of your collection view to Force Left to Right
  2. In the override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] method reverse the view controllers array before returning it
  3. In ViewWillAppear go to the last element of the array but make sure to dispatch to the main queue

    DispatchQueue.main.async {
        if(self.itemsList.value.count > 0){
            self.moveToViewController(at: self.itemsList.value.count-1, animated: false)
        }
    
    }
    
Georgio Sayegh
  • 343
  • 1
  • 15