title: objective-C/Swift: add child view/controller into superview, but with controller included
body: <p>Till now I have worked in different RAD IDE's such as C# and Delphi, and xCode/ObjectiveC/Swift concepts are still new to me (also all is mixed in my head right now :))</p>
  
  <p>Here is my application:</p>
  
  <ul>
  <li>Storyboard with 2 view controllers, both are having classes associated.</li>
  <li>Views/Controllers are not connected in any way via Interface Builder</li>
  <li>One view controller will be started at app start.</li>
  <li>Let the starting view is empty, and on second there is a 1 UIButton</li>
  <li>I have made IBOutlet and IBAction for this button in my controller and it does some change, e.g change color or something else.</li>
  </ul>
  
  <p>I want to place one view into another (child into super view), but I also want to keep that controller of child view is still in control of its own view.</p>
  
  <p>So, when child view is added into new view/controller - I still can click on button from child controller and do the action written in controller code.</p>
  
  <p>I know how to add bare view into another view (via addView method), but I am losing controller.</p>
  
  <p>I am not sure if is this possible at all, maybe I am missing a whole concept of MVC coding, but maybe is trivial.</p>
  
  <p>I hope that I have explained well.</p>
  
  <p>Edit:</p>
  
  <p>This is what I get for solution:</p>
  
  <pre><code>let ingredientsController = IngredientsController(nibName: "IngredientsController", bundle: nil)
  addChildViewController(ingredientsController)
  ingredientsController.view.frame = CGRect(x: 100, y: 100, width: 300, height: 200)
  scrollView.addSubview(ingredientsController.view)
  </code></pre>