title: Check if tabBar is nil
body: <p>I'm trying to see if my TabBar is nil.</p>
  
  <p>In Objective-C I would do so:</p>
  
  <pre><code>if(self.tabBar != nil){
  }
  </code></pre>
  
  <p>if I try to do this to me in swift returns this error:</p>
  
  <p><strong><em>'UITabBar' is not a subtype of 'NSString'</em></strong></p>
  
  <p>This is the code that I have to write in whole swift:</p>
  
  <pre><code>override func viewDidLayoutSubviews() {
      //check tabBar not null
      if (self.tabBar != nil)
      {
          //make changes in frame here according to orientation if any
          self.tabBar.frame = CGRect(x: 00, y: 20, width:self.view.bounds.size.width, height: 49)
      }
  }
  </code></pre>