FAQ Database Discussion Community


Why behaviour from AppDelegate and via typhoon is different?

ios,objective-c,typhoon
i want to set style for status bar to: [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent; if i'm doing it from AppDelegate directly - everything is ok, but via Typhoon - not. 1) That's working ok: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[self styleKit] apply]; [self.window makeKeyAndVisible]; return YES; } 2) And that's...

Typhoon injection and setting delegate

ios,swift,dependency-injection,delegates,typhoon
I'm coding in iOS with Swift. I am using plist and storyboard integration. I have an object which has a delegate. I wish to inject this object into several view controllers (not all at once) and set the delegate of this object to be the view controller which the object...

How do I access the assembly that is plist activated?

ios,objective-c,typhoon
I am transitioning a project to use plist integration for Typhoon. I can see that the assemblies that I added to the TyphoonInitialAssemblies key are being activated, but after I don't know how to access the activated assembly.

Instantiate a view controller from UIStoryBoard after using TyphoonAssemblyActivator

objective-c,typhoon
After using the new API with the TyphoonAssemblyActivator interface, I would like to instantiate a UIViewController located within a UIStoryBoard, but it misses the factory instance. How should I do this ?...

Can't inject property, setter selector not found

ios,swift,typhoon
Using Typhoon and Swift, I am setting up my project and I have this problem. I have a class TPLAddInteractor this way class TPLAddInteractor: NSObject, TPLAddInteractorInput { var output: TPLAddInteractorOutput? var dataManager: TPLDataManagerInterface? } My assembly looks like this class TPLAddAssembly: TyphoonAssembly { var applicationAssembly: TPLApplicationAssembly? dynamic func addInteractor() ->...

Is there a strong case against making my TyphoonAssembly a singleton? If so, why? If not, is there a recommended way to do so?

ios,objective-c,dependency-injection,typhoon
I'm getting started with Typhoon and finding that it is annoying to keep writing constructors with additional assembly arguments. So it is tempting to just make my TyphoonAssembly a singleton. But I've yet to see that done in any examples, and I do see examples where constructor or property injection...

Typhoon inject xib loaded table cells

ios,objective-c,uikit,typhoon
I’m trying to migrate some of my view controllers and UITableView subclasses over to using Typhoon, but I can’t find any documentation around what to do with cells that are generated from a tableView’s dequeReusableCellWithIdentifier. The TableViewController I’m working with uses multiple cell types which it registers with the TableView...

TyphoonStoryboard problems

ios,typhoon
i'm trying to instantiateInitial viewControllers manually and stuck with next thing. This is working: -(TyphoonStoryboard *)storyboard { return [TyphoonDefinition withClass:[TyphoonStoryboard class] configuration:^(TyphoonDefinition* definition) { [definition useInitializer:@selector(storyboardWithName:factory:bundle:) parameters:^(TyphoonMethod *initializer) { [initializer injectParameterWith:@"Diary"]; [initializer injectParameterWith:self]; [initializer injectParameterWith:[NSBundle mainBundle]]; }]; definition.scope =...

Injecting parameter in Typhoon Swift

ios,swift,typhoon
I am using the following code to inject a enum parameter in Typhoon in Swift: public dynamic func introPageViewController() -> AnyObject { return TyphoonDefinition.withClass(UIPageViewController.self) { (definition) in definition.useInitializer("initWithTransitionStyle:navigationOrientation:options:"){ (initializer) in initializer.injectParameterWith(UIPageViewControllerTransitionStyle.Scroll) } } } The problem is that injectParameterWith method only accepts parameters of type AnyObject and the parameter I...