title: Moving Tab Bar to the top of the screen swift
body: <p>I want to have the Tab Bar at the top of the screen. One post suggested to do the followings (I put the following code in the viewDidLoad() of the UITabBarController) :</p>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>let tabBar = self.tabBar
  
  // yStatusBar indicates the height of the status bar
  let yStatusBar = UIApplication.sharedApplication().statusBarFrame.size.height
  
  // Set the size and the position in the screen of the tab bar
  tabBar.frame = CGRectMake(0, yStatusBar, tabBar.frame.size.width, tabBar.frame.size.height)
  </code></pre>
  
  <p>There are 2 problems with this solution:</p>
  
  <ol>
  <li><p>The bottom of the screen is left with a black region where the tab bar was</p></li>
  <li><p>The Tab bar covers the view at the top of the screen - the constraints of that view is relative to the device but they should be relative to the Tab bar. However when the screen is designed in the IB there is no Tab bar to relate to.</p></li>
  </ol>
  
  <p>Is there a way to overcome these problems? P.S. I am new to IOS</p>