Reputation: 255
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:
which is the right way to be ..
i have just added the sixth child and it got messed up .. like this:
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?
Upvotes: 1
Views: 218
Reputation: 343
To get the needed behavior, one must the following:
semantic property
of your collection view to Force Left to Right
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController]
method reverse the view controllers array before returning itIn 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)
}
}
Upvotes: 0