title: Adjusting Views inside Scroll View
body: <p>I have placed the views of my view controllers inside a scroll view. But when i ran my app on iPhone 6Plus, my views doesn't fill the screen and i can see other view on the right. How can i fix this issue.</p>
  
  <p>HERE IS THE SCREENSHOT OF THE PROBLEM</p>
  
  <p><a href="https://i.stack.imgur.com/0i4Zw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0i4Zw.png" alt="image"></a></p>
  
  <p>AND THIS IS MY CODE</p>
  
  <pre><code>contentView.contentSize = CGSize(width: contentView.frame.size.width * 5, height: contentView.frame.size.height)
  
  
          rifleViewController.view.frame = contentView.bounds
          contentView.addSubview(rifleViewController.view)
  
          pistolViewController.view.frame = contentView.bounds
          pistolViewController.view.frame.origin.x = contentView.frame.size.width
          contentView.addSubview(pistolViewController.view)
  
          shotgunViewController.view.frame = contentView.bounds
          shotgunViewController.view.frame.origin.x = contentView.frame.size.width * 2
          contentView.addSubview(shotgunViewController.view)
  
          smgsViewController.view.frame = contentView.bounds
          smgsViewController.view.frame.origin.x = contentView.frame.size.width * 3
          contentView.addSubview(smgsViewController.view)
  
          sniperViewController.view.frame = contentView.bounds
          sniperViewController.view.frame.origin.x = contentView.frame.size.width * 4
          contentView.addSubview(sniperViewController.view)
  </code></pre>