ios - Typhoon : Obtain a Typhoon-built instance of a class without depending on Typhoon -


with typhoon storyboard integration, necessary dependency injection use auto-injection macros or assembly methods on class injected.

however elsewhere, necessary ask typhoon build instance us. there way obtain instance, without having class depend on typhoon?

yes, in spirit of dependency injection, typhoon designed not necessary user classes have direct dependency on typhoon.

let's wish obtain instance of viewcontrollerb viewcontrollera within typhoon application. this, create our definition viewcontrollera such assembly injected, , ask assembly build instance. shown in sample application , detailed in user guide here.

the next step, if wish decouple application classes typhoon, assemblies protocol, , inject that. in way, application sees provider interface class view controller needs in order job. here's tutorial on how this.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -