title: How to add variable in existing class in swift?
body: <p>I know that in swift we can use <code>Extensions</code> to add new methods to existing classes.</p>
  
  <p><strong>But what about if i want to add a variable?</strong></p>
  
  <pre><code>extension UIViewController {
  
      var myVar = "xyz"
  }
  </code></pre>
  
  <p>It gives like :</p>
  
  <blockquote>
    <p>Extensions must not contain stored properties</p>
  </blockquote>