title: How do I programatically add a view into another view loaded from a XIB file?
body: <p>I have a XIB file (view) that has a toolbar and a view right below it, as illustrated in the image below:</p>
  
  <p><img src="https://i.stack.imgur.com/7UA5q.jpg" alt="Desired View"></p>
  
  <p><a href="http://raphaeu.com/pergunta/voltar.jpg" rel="nofollow noreferrer">You can also view the image here.</a></p>
  
  <p>I am using the following PhotoScroller: <a href="http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html" rel="nofollow noreferrer">http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html</a></p>
  
  <p>The problem is that the PhotoScroller is dynamically created into the method loadView and directly assigned to its own view. That makes the PhotoScroller fills up the entire screen, which is not what I want.</p>
  
  <p>I want to be able to put the PhotoScroller only inside the view that is below the toolbar (that is, the view numbered 2 in the picture above).</p>
  
  <p>I think I have to load the view that is inside the XIB file and assign the PhotoScroller to that view. However, I have no idea how to do that (or if that`s even the solution).</p>
  
  <p>How could I do that?</p>
  
  <p>PS: Even though the number 2 shows a list, it is not a list! It<code>s just a simple blank view (I just couldn</code>t find a better image to put here).</p>
  
  <p>Thank you in advance! :)</p>