Giter Club home page Giter Club logo

Comments (7)

msaps avatar msaps commented on June 14, 2024 1

These changes are now available in the Pageboy 2.0 beta's 👍

Latest available here: 2.0.0 Beta 2.

Expecting final release to be available alongside Swift 4.0 support around September time.

from pageboy.

muukii avatar muukii commented on June 14, 2024

Or, I just have one more idea.
I think also interesting that returning factory closure for UIViewController.

[UIViewController]?
[() -> UIViewController]?

from pageboy.

msaps avatar msaps commented on June 14, 2024

@muukii I agree completely. A more 'reusable' style data source would definitely be an improvement.

Have currently got it planned for v2.0.0 which I'm aiming to release in September time alongside Swift 4.0. 😄

from pageboy.

msaps avatar msaps commented on June 14, 2024

Raised an issue for the changes. #88

from pageboy.

muukii avatar muukii commented on June 14, 2024

@msaps
Sounds good!
I'm looking forward it.
Please let me know if I can do anything to help.

from pageboy.

otymartin avatar otymartin commented on June 14, 2024

@muukii @msaps
Im experiencing this problem. In one project, the VC's load lazily - "viewDidLoad" only fires when im about to scroll to that specific VC for the first time. However in another project, all VC's are initialized at the same time (ViewDidLoad fires in all of them at launch). What could possibly cause this, both are using latest version of Pageboy/Tabman

from pageboy.

otymartin avatar otymartin commented on June 14, 2024

Figured out the problem

When initializing VC's for your datasource, if you perform configuration work in the initialization process, the VC will not be lazily loaded.

Eg.

var viewControllers: [UIViewController] = [] // Datasource

func loadVCS() {
 let vc = UIViewController()
vc.view.backgroundColor = .black // This ensures this VC will be loaded even if it's not yet on screen. Remove it if you want the VC to be lazily loaded (ie. When you first scroll to it).
viewControllers.append(vc)
}

from pageboy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.