xmartlabs / XLPagerTabStrip

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

The size of buttons isn't calculated. calculateWidths() isn't called after navigation to viewController on AppBecomeActive event #749

Open vitaliypriydun opened 5 years ago

vitaliypriydun commented 5 years ago
alekseitsyss commented 4 years ago

Hey, did you manage to fix that?

vitaliypriydun commented 4 years ago

Hey, did you manage to fix that?

Hi there. Yes, but my solution isn't perfect.

All I did was forcing my vc to layout

let someViewController = ... ()
someViewController.view.setNeedsLayout()
someViewController.view.layoutIfNeeded()

and then push or present this view controller.

If you are using storyboards and segues, then maybe call that two lines in prepareForSegue. Also keep in mind that this workaround may be broken in the next iOS versions, cuz as we can see, apple changes the way segues works sometimes.