title: UITextField working in iPhone XR, but not in iPhone 7 (Xcode Swift)
body: <p>I am unable to get UITextField to accept an input in iPhone 7 simulator. The code works fine in iPhone XR simulator. What is missing?</p>
  
  <p>Full code below:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UIScrollViewDelegate {
      var scrollView: UIScrollView!
      var containerView = UIView()
  
      var textFieldFirstNameSignUp: UITextField!
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          let screenSize = UIScreen.main.bounds.size
  
          let width = screenSize.width - 60
  
          let titleLabel = UILabel(frame: CGRect(x: 30, y: 80, width: width, height: 26))
          titleLabel.font = UIFont.systemFont(ofSize: 32)
          titleLabel.text = "Create New Account"
          self.containerView.addSubview(titleLabel)
  
          self.scrollView = UIScrollView()
          self.scrollView.delegate = self
          scrollView.contentSize = CGSize(width:1000, height:1000)
  
          containerView = UIView()
          scrollView.addSubview(containerView)
          view.addSubview(scrollView)
          containerView.addSubview(titleLabel)
  
          textFieldFirstNameSignUp = UITextField(frame: CGRect(x: 30, y: 140, width: width, height: 50))
          textFieldFirstNameSignUp.placeholder = "First Name"
          textFieldFirstNameSignUp.font = UIFont.systemFont(ofSize: 18)
          self.containerView.addSubview(textFieldFirstNameSignUp)
      }
  
      override func viewDidLayoutSubviews() {
          super.viewDidLayoutSubviews()  
          scrollView.frame = view.bounds
          containerView.frame = CGRect(x:0, y:0, width: scrollView.contentSize.width, height: scrollView.contentSize.height)
      }
  }
  </code></pre>