title: Button doesn’t work properly after subclassing view controller to base controller
body: <p>I am making a simple app, which for now has 3 pages, and I wanted to have a base view controller to all my view controllers. But my button on the first page, which was working perfectly, that, when clicked, goes to the second page, doesn't work properly anymore, meaning, the button opens up a blank page and not the second page. But when I remove the subclass from the other view controllers, the button works perfectly. BTW I'm creating this app 100% programmatically. I know that I haven't provided the code or any screenshots of my code, but I hope you can help me out! Thanks! :)</p>
  
  <pre><code>// Setup the login button
  func setupLoginButton() {
  
      loginButton.backgroundColor = UIColor.clear
      loginButton.setTitle("Login", for: .normal)
      loginButton.titleLabel?.font = UIFont(name: "Avenir-Heavy", size: 25)
      loginButton.setTitleColor(baseColor, for: .normal)
      loginButton.layer.borderWidth = 1
      loginButton.layer.borderColor = baseColor.cgColor
      loginButton.layer.cornerRadius = 25
  
      // Make it go to the main screen when pressed
      loginButton.addTarget(self, action: #selector(loginButtonPressed), for: .touchUpInside)
  
      view.addSubview(loginButton)
      addLoginButtonConstraints()
  
  }
  
  // Add the constraints to the login button
  func addLoginButtonConstraints() {
  
      loginButton.translatesAutoresizingMaskIntoConstraints = false
      loginButton.heightAnchor.constraint(equalToConstant: 50).isActive = true
      loginButton.widthAnchor.constraint(equalToConstant: 335).isActive = true
      loginButton.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
      loginButton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: -5).isActive = true
  
  }
  
  // When login button is pressed
  @objc func loginButtonPressed() {
  
      let mainPage = MainScreen()
      present(mainPage, animated: true, completion: nil)
  
  }
  </code></pre>
  
  <p>So here, When I click on the login button, it should go to the mainPage, but it just opens up a blank page.</p>
  
  <p>Here is the mainPage</p>
  
  <pre><code>import UIKit
  
  class MainScreen: BaseAndExtensions {
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
      }
  
  }
  </code></pre>
  
  <p>BaseAndExtensions is the base view controller.</p>