krzyzanowskim / Natalie

Natalie - Storyboard Code Generator (for Swift)
http://blog.krzyzanowskim.com/2015/04/15/natalie-storyboard-code-generator/
MIT License
1.17k stars 74 forks source link

Question about ViewControllers and XIB Files #81

Closed ed-mejia closed 7 years ago

ed-mejia commented 8 years ago

Hi, Great project!

One question this lib works for Strings like nibNames? for example Im trying to don't use SB and create my controllers via XIB files so I generally I will have something like this in the ViewController:

init(viewModel: ViewModel) {
        self.viewModel = viewModel
        super.init(nibName: "LoginView", bundle: nil)
    }

Just like with Segues or Cell identifiers would be nice to be able to use this lib to avoid the burned "LoginView" XIB file name, is this possible?

krzyzanowskim commented 8 years ago

Currently it doesn't work with XIB file because it's designed to parse storyboard format, thought it would be possible to add xib support - I don;t thinky anybody is working about it right now, you may be first.

ed-mejia commented 8 years ago

Hi @krzyzanowskim thanks for the response, in fact I came here looking for a library for something like that after being using Laurine which is really awesome library for localization... So I just started to feel the need of using the same approach for Image Names, and any possible string identifier within my code.

Btw I found this repo R, It almost cover everything but I don't like their naming "convention" about using _"R"_ ... :confused:

krzyzanowskim commented 8 years ago

sure. Natalie was here before R addedd support for Storyboards and afaik its in different sense :-) though, feel felree use what better work for you