xmartlabs / XLPagerTabStrip

Android PagerTabStrip for iOS.
MIT License
6.97k stars 1.33k forks source link

how to fix RTL #788

Open imi24 opened 4 years ago

imi24 commented 4 years ago

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() }

Dev-Khaled commented 2 years ago

https://github.com/xmartlabs/XLPagerTabStrip/issues/282#issuecomment-1031655006