       if let key = newValue, container = Storyboard.container {
         let tag = DependencyContainer.Tag.String(key)
         if let instantiatable = self as? StoryboardInstantiatable {
-          instantiatable.instantiatedFromStoryboard(withTag: tag, container: container)
+          instantiatable.didInstantiateFromStoryboard(withTag: tag, container: container)
         }
       }
     }

}

extension Storyboard {
  ///Container that will be used to resolve _dependencies of components_, created by stroyboard.
  static public var container: DependencyContainer?
}


}

public protocol StoryboardInstantiatable {
  
  /**
   This method will be called if you set a `dipTag` attirbute on the object in a storyboard.
   
   - parameters:
      - tag: The tag value, that was set on the object in a storyboard
      - container: The `DependencyContainer` associated with storyboards

   The type that implements this protocol should be registered in `UIStoryboard.container`.
   Default implementation of that method calls `resolveDependenciesOf(_:forTag:)`
   and pass it `self` instance and the tag.

   Usually you will not need to override the default implementation of this method
   if you registered the type of the instance as a concret type in the container.
   Then you only need to add conformance to `StoryboardInstantiatable`.

   You may want to override it if you want to add custom logic before/after resolving dependencies
   or you want to resolve the instance as implementation of some protocol which it conforms to.
   
   - warning: This method will be called after `init?(coder:)` but before `awakeFromNib` method.
              Thus the instance may be not completely setup yet.

   **Example**:
   
   ```swift
   extension MyViewController: SomeProtocol { ... }
   
   extension MyViewController: StoryboardInstantiatable {
     func didInstantiateFromStoryboard(withTag tag: DependencyContainer.Tag, container: DependencyContainer) {
       //resolve dependencies of the instance as SomeProtocol type
       try! container.resolveDependenciesOf(self as SomeProtocol, forTag: tag)
       //do some additional setup here
     }
   }
   ```
   
  */
  func didInstantiateFromStoryboard(withTag tag: DependencyContainer.Tag, container: DependencyContainer)
}

extension StoryboardInstantiatable {
  public func didInstantiateFromStoryboard(withTag tag: DependencyContainer.Tag, container: DependencyContainer) {
    do {
      try container.resolveDependenciesOf(self, forTag: tag)
    }
