xmartlabs/XLPagerTabStrip

how to fix RTL

imi24 opened this issue · 1 comments

imi24 commented

how to fix RTL
i fixed with some change in library
add
open func startTab(_ startIndex:Int) { currentIndex = startIndex }
in PagerTabStripViewController.swift

add
open func setStartTab(_ startIndex:Int) { startTab(startIndex) collectionViewDidLoad = true }
in ButtonBarPagerTabStripViewController.swift

and in my project

in class ParentViewController: ButtonBarPagerTabStripViewController
function viewDidLoad()
set
super.viewDidLoad() setStartTab(allViewAontroller.count - 1)

and reverse my array
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] { for i:Int in 0..<(3){ allViewAontroller.append(UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "child" + String(i + 1))) } return allViewAontroller.reversed() }