title: add tab bar without tab bar controller in swift
body: <p>I need to add an tab bar in my view with out tab bar controller, because in my <code>prepareForSegue</code> function I pass data to my view whitch contains the tab bar.</p>
  
  <p>I add the tab bar from the object library with its items, and in my view class I add UITabBarDelegate.
  my code is like this:</p>
  
  <pre><code>class SchedaCompletaVC: UIViewController, UITabBarDelegate {
  
  var event:Event! // data passing from prepareforsegue
  
  @IBOutlet var mainTabBar:UITabBar!
  var descrizioneTab:UIViewController! //if i click on first tab, so my default view 
  var mappaTab:UIViewController! // second tab
  
  override func viewDidLoad() {
      super.viewDidLoad()
      println("event \(event.eventId)")
  
      // Do any additional setup after loading the view.
  }
  
  func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem!) {
      switch (item.tag) {
      case 1:
          self.view.insertSubview(descrizioneTab.view.belowSubview(mainTabBar)) //here I had error
         break;
      case 2:
          //if second tab is selected
          break;
      default:
          break;
      }
  }
  </code></pre>
  
  <p>I got this code from an <a href="http://nullpointr.wordpress.com/2012/02/18/ios-dev-add-tabbar-to-a-view-without-a-tabbarcontroller/" rel="nofollow noreferrer">tutorial</a> whitch is for objective-c, I tried to convert it in swift.</p>
  
  <p>My code doesn't work, I don't know what to do? </p>
  
  <p>Please help. Thank you!</p>
  
  <p>Update:
  my storyboard is like this: <img src="https://i.stack.imgur.com/EeYAK.png" alt="enter image description here"></p>