Search code examples
iosswiftuipageviewcontrolleruipagecontrol

Using Tabman paging view controller, Can the default tab order be changed to RTL?


I'm using the Tabman paging view controller and would like to change the order of appearance to Right-to-Left, so that the right tab will be the first to show. Is it possible to do so? And is it possible to choose a specific tab (for example, tab 3 of 6) to be the first to appear? Without changing the inner order of the tabs.


Solution

  • There isn't any specific property for RTL order. Use below method

     func viewController(for pageboyViewController: PageboyViewController,
                            at index: PageboyViewController.PageIndex) -> UIViewController? {
         // Your View Controller
        }
    

    For specific tab you can use below delegate method.

    func defaultPage(for pageboyViewController: PageboyViewController) -> PageboyViewController.Page?