Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

instantiateInitialController return type should be scoped by enclosing module #114

Open
nhojb opened this issue Jan 30, 2018 · 0 comments
Open
Labels

Comments

@nhojb
Copy link
Collaborator

nhojb commented Jan 30, 2018

This is an issue if the storyboard has the same name as the initial controller e.g.

struct Storyboards {
    struct FooViewController: Storyboard {
        static func instantiateInitialController() -> FooViewController {
            return self.storyboard.instantiateInitialController() as! FooViewController
        }
    }
}

Opps! instantiateInitialController returns a Storyboards.FooViewController, not a Module.FooViewController :-(

The obvious work-around is not to name storyboards using the same name as the initial view controller. However for simple storyboards this can be a convenient and natural naming.

Looks like natalie just needs to parse the "customModule" attribute for "viewControllers" in the storyboard xml.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants