XLPagerTabStrip
XLPagerTabStrip copied to clipboard
xlpagertabstrip tabs spacing issue swift
I am making an tablet app in which i used xlpagertabstrip(third party library) for tabs. So i setup everything giving in documentation. But the issue is when i opened the Viewcontroller from a simple button it looks fine. This is Container view Code: ` override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] { let child_1 = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "DailyStaticsReportsVC") let child_2 = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "DeliveryDriveReportVC") let child_3 = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ItemSaleReportVC") let child_4 = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "DeliveryOrdersReportVC")
return [child_1,child_2, child_3, child_4]
}
`
And when i Opened from a side menu .Then the spacing between the tabs is ruined. All the tabs comes to left side and shrink the tabs. and this is left menu code:
@IBAction func sideMenuTapped(_ sender: UIBarButtonItem) { panel?.configs = FAPanelConfigurations() panel?.openLeft(animated: true) }
I am facing the same issue.
I know that this is tricky, but that was happening to me, and the only way i managed to get this behavior fixed was setting:
On viewDidLoad
buttonBarView.translatesAutoresizingMaskIntoConstraints = true
and then on viewWillAppear
buttonBarView.translatesAutoresizingMaskIntoConstraints = false
I know that this is tricky, but that was happening to me, and the only way i managed to get this behavior fixed was setting:
On viewDidLoad
buttonBarView.translatesAutoresizingMaskIntoConstraints = true
and then on viewWillAppearbuttonBarView.translatesAutoresizingMaskIntoConstraints = false
Hi, I tried this but, spacing not shrinking but my rightmost menu item got spaced more towards to right and barbuttonView started scrolling. Any clue why is that happening... Please guide me through anyone