Closed salvasp closed 6 years ago
@salvasp thanks for all the detail, just released a new version with this fix in. Let me know how you get on with it! 😄 v2.3.4
yes seems to work.
Have you panned something like extending
func viewController(for pageboyViewController: PageboyViewController, at index: PageboyViewController.PageIndex) -> UIViewController?
with somentig like
func viewController(for pageboyViewController: PageboyViewController, at index: PageboyViewController.PageIndex, reusingViewController: UIViewController?) -> UIViewController?
to reuse the cached view controllers?
I commented the issue #124 with some idea but for now I'm using in one case the variable [UIViewController?] (in the comments after the NSCache row) because i have just 6 view controllers.
in another case 50+ view controllers I create a view controller (let controller = storyboard.instatiate....; return controller) each time "viewController for" is called
@salvasp I'll take a look! Reuse / improved insertion is high on the list for Pageboy 3, so hopefully will get to start working on it shortly 😄
If swipe quickly between pages I sometime get the error inconsistent exception "Invalid parameter not satisfying: [views count] == 3"
seems can be fixed replacing inside "open class PageboyViewController: UIViewController"
with