-
Notifications
You must be signed in to change notification settings - Fork 268
Storyboards
By using plist integration, Typhoon will ensure that all Storyboards are an instance of TyphoonStoryboard
. Use exactly as you would a normal Storyboard, with the added benefit that dependencies will be injected according to the definitions in your TyphoonAssembly class(es).
The TyphoonComponentFactory will be retained by the storyboard, and so persists throughout the life-cycle of your application.
By default Typhoon will inject by matching the type of the UIViewController to a component in the assembly. Optionally, you can specify which definition should be used for each viewController using the 'typhoonKey' runtime attribute. Example:
###Creating a new Storyboard Programmatically
UIStoryboard *board = [TyphoonStoryboard storyboardWithName:@"AStoryBoardName"
factory:factory bundle:[NSBundle mainBundle]];
where 'factory' is obtained using the the approach described in proceeding from one object graph to another
See also: Storyboards work well in conjunction with Autowiring
Something still not clear? How about posting a question on StackOverflow.
Get started in two minutes.
Get familiar with Typhoon.
- Types of Injections
- What can be Injected
- Auto-injection (Objective-C)
- Scopes
- Storyboards
- TyphoonLoadedView
- Activating Assemblies
Become a Typhoon expert.
For contributors or curious folks.