Git Product home page Git Product logo

Comments (3)

AliSoftware avatar AliSoftware commented on May 17, 2024

Hi @amarcadet

Adding the return type to initialViewController would indeed be a nice enhancement. Could be a great feature to add.

However, I don't see how this is related to your `Static member 'Loading' cannot be used on instance of type 'StoryboardScene.Loading'`` error. Did you mean to file two separate issue, one for the feature request and the other for an actual bug?

from swiftgen.

AliSoftware avatar AliSoftware commented on May 17, 2024

@amarcadet

I just fixed the error you had by modifying the default template (you could have done it on your own template — no need to update SwiftGen for that even). That was due to an ambiguity for the compiler because the enum and case had the same name, so I disambiguated it.

Regarding initialViewController returning the proper subclass, after thinking about it I'm not sure that's entirely possible. Well it could be, but would require (1) finding the back-reference of the objectID mentioned as being the initialViewController in the storyboard's XML tree (2) more importantly, reimplementing initialViewController in each generated enum instead of using the protocol's default implementation. You could make a PR if you like to add this feature yourself, but not sure it's worth the effort to do that myself given that last point.

from swiftgen.

amarcadet avatar amarcadet commented on May 17, 2024

Thanks for the fix!

Regarding initialViewController, I think it would be a nice to have.I will try to take a look and make PR if I succeed.

from swiftgen.

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.