title: Overriding TabBar selectedIndex
body: <p>I have a viewController that inherits from <strong>UITabBarController</strong> .</p>
  
  <p>I am trying to override the selectedIndex variable so that I can get notified when it gets changed with the didSet like the code below.</p>
  
  <pre><code>override var selectedIndex: Int {
      didSet {
          refreshTabBar()
      }
  }
  </code></pre>
  
  <p>The problem is that that function is not getting called when tabs get changed and I need to know why.</p>
  
  <p><strong>PS: I do not want to call it from the didSelect delegate method.</strong></p>
  
  <p>Thanks.</p>