AliSoftware / Dip

Simple Swift Dependency container. Use protocols to resolve your dependencies and avoid singletons / sharedInstances!
MIT License
978 stars 75 forks source link

Inject properties in storyboard root view controller #218

Closed alphatroya closed 5 years ago

alphatroya commented 5 years ago

It looks like storyboard support not work well when I specify Main Interface parameter in project settings (without manual configuration it in the AppDelegate). Does Dip support this case?

ilyapuchka commented 5 years ago

Have you checked the sample app? It uses this setting and works as expected.

alphatroya commented 5 years ago

The sample app performs all needed setup in AppDelegate method, but I think about a more "automatic" approach. Swinject have a SwinjectStoryboard class for implicit creation root controller without any code in AppDelegate method. Do you think about a similar solution?

ilyapuchka commented 5 years ago

@alphatroya yes, and I don't think it brings enough value to justify method swizzling. The framework shouldn't be that much intrusive.

alphatroya commented 5 years ago

Yes, maybe you're right. Close this issue.