Skip to content

Commit

Permalink
Merge pull request #9 from mlilback/master
Browse files Browse the repository at this point in the history
NSWindowController injection cascades to contentViewController
  • Loading branch information
yoichitgy authored Jul 1, 2016
2 parents d9ad97f + 4eed766 commit cc26bc5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/SwinjectStoryboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ public class SwinjectStoryboard: _SwinjectStoryboardBase, SwinjectStoryboardType
} else {
fatalError("A type conforming ResolverType protocol must conform _ResolverType protocol too.")
}

if let windowController = controller as? NSWindowController, let viewController = windowController.contentViewController {
injectDependency(viewController)
}
if let viewController = controller as? NSViewController {
for child in viewController.childViewControllers {
injectDependency(child)
Expand Down

0 comments on commit cc26bc5

Please sign in to comment.