title: iOS 11 Swift 4 iPhone X Safe Area Support of full screen ScrollView
body: <p>I currently have my layout design setup as a fullscreen scrollview on one view controller in which I add other view controllers as sub views to create a paged effect. On normal iphone screens it works beautifully. However when running on iPhone X, things seem to appear off centered, and I can page in multiple times in one page. </p>
  
  <p>Here is my code for setup of the scrollview </p>
  
  <pre><code>self.scrollView.contentSize = CGSize(width: self.view.frame.width, height: self.view.frame.size.height * 3)
          if #available(iOS 11.0, *) {
              self.scrollView.contentInsetAdjustmentBehavior = .never
          } else {
              // Fallback on earlier versions
          }
  
  
          let V1 = self.storyboard?.instantiateViewController(withIdentifier: "S1") as! UINavigationController!
          self.addChildViewController(V1!)
          self.scrollView.addSubview(V1!.view)
          V1?.didMove(toParentViewController: self)
          V1?.view.frame = scrollView.bounds
          myViewsArray.append(V1!)
  
          let V2 = self.storyboard?.instantiateViewController(withIdentifier: "S2") as UIViewController!
          self.addChildViewController(V2!)
          self.scrollView.addSubview(V2!.view)
          V2?.didMove(toParentViewController: self)
          V2?.view.frame = scrollView.bounds
          myViewsArray.append(V2!)
  
          var V1Frame: CGRect = V1!.view.frame
          V1Frame.origin.y = 2*self.view.frame.height
          V1?.view.frame = V1Frame
  
          var V2Frame: CGRect = V2!.view.frame
          V2Frame.origin.y = (self.view.frame.height)
          V2?.view.frame = V2Frame
  
          V2!.view.alpha = 1
  </code></pre>
  
  <p>I have safe area on in story board. </p>
  
  <p><a href="https://i.stack.imgur.com/qKa7el.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qKa7el.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/NgK3Ll.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NgK3Ll.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/WRzhNl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WRzhNl.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/gDAyFl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gDAyFl.png" alt="enter image description here"></a></p>