title: "Extensions must not contain stored properties" preventing me from refactoring code
body: <p>I have a 13 lines func that is repeated in my app in every ViewController, which sums to a total of 690 lines of code across the entire project! </p>
  
  <pre><code>/// Adds Menu Button
  func addMenuButton() {
      let menuButton = UIButton(frame: CGRect(x: 0, y: 0, width: 30, height: 30))
      let menuImage = UIImage(named: "MenuWhite")
      menuButton.setImage(menuImage, for: .normal)
  
      menuButton.addTarget(self, action: #selector(menuTappedAction), for: .touchDown)
      self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: menuButton)
  }
  /// Launches the MenuViewController
  @objc func menuTappedAction() {
      coordinator?.openMenu()
  }
  </code></pre>
  
  <p>for menuTappedAction function to work, I have to declare a weak var like this:</p>
  
  <pre><code>extension UIViewController {
  
  weak var coordinator: MainCoordinator?
  </code></pre>
  
  <p>But by doing this I get error <code>Extensions must not contain stored properties</code> 
   What I tried so far: </p>
  
  <p>1) Removing the <code>weak</code> keyword will cause conflicts in all my app.
  2) Declaring this way: </p>
  
  <pre><code>weak var coordinator: MainCoordinator?
  extension UIViewController {
  </code></pre>
  
  <p>Will silence the error but the coordinator will not perform any action. Any suggestion how to solve this problem?</p>