Open NikhilGangurde opened 4 years ago
I also have a similar issue but in my case the view controller overflows the container.
As a temporary solution I reload the XLPager in the viewDidAppear() method using self.reloadPagerTabStripView() but this results in a repetitive API call which is very disturbing 😔😔
I also have a similar issue , and use self.reloadPagerTabStripView()
@harshpanchal-silverwing rather than including self.reloadPagerTabStripView()
in viewDidAppear()
reload you pagerstripview in viewWillAppear
like
override func viewWillAppear(_ animated: Bool) {
setupNav()
self.reloadPagerTabStripView()
}
this will solve the repetitive API call issues. Thanks for the solution.
Managed to solve the issue on my side by using this,
DispatchQueue.main.async { self.moveToViewController(at: 0) }
when pager loads tableview in the first child view controller leaves space from both sides but if I switched tabs then it acquires the screen as I wanted.
here is the screenshot of a simulator for understanding:
And after switching tabs and as expected:
my whole setup is normal tableview has nothing done in that its just a view and here is XKPager setup
Xcode version: 11.2.1 swift version: 5 ios deployment target: 10.0 XLPager updated