title: Center a view inside viewcontroller in iOS Playground app
body: <p>I'm currently building a swift playground book. Is it possible to center a view inside a view controller while running on an iPad ? </p>
  
  <p>Here's my <code>loadView</code> function of my view controller:</p>
  
  <pre><code>override public func loadView() {
      let view = UIView()
      view.backgroundColor = .white
      view.frame = CGRect(x: 0, y: 0, width: 375, height: 667)
      self.view = view
  
      let frame = CGRect(x: 0, y: 0, width: 375, height: 375)
      let newView = UIView(frame: frame)
      view.addSubview(newView)
  }
  </code></pre>
  
  <p>How can I center the <code>newView</code>in the view of the view controller? </p>
  
  <p>Thanks ! </p>