title: How to set the UITabBars items property when accessing through a UITabBarController?
body: <p>I have build a UITabBarController programmatically and populated its <code>viewControllers</code> property.
  When I run this the tabBar buttons are, of course, empty, I tried to access the <code>tabBar</code> property on the UITabBarController to set its <code>items</code> property to my text/images, which made the app crash.</p>
  
  <p>Going through the documentation for the UITabBarController I read this under the tabBar property:</p>
  
  <blockquote>
    <p>The tab bar view associated
    with this controller. (read-only)</p>
    
    <p>@property(nonatomic,readonly) UITabBar
    *tabBar Discussion You should never attempt to manipulate the UITabBar
    object itself stored in this property.
    If you attempt to do so, the tab bar
    view throws an exception. To configure
    the items for your tab bar interface,
    you should instead assign one or more
    custom view controllers to the
    viewControllers property. The tab bar
    collects the needed tab bar items from
    the view controllers you specify.</p>
    
    <p>The tab bar view provided by this
    property is only for situations where
    you want to display an action sheet
    using the showFromTabBar: method of
    the UIActionSheet class.</p>
  </blockquote>
  
  <p>This is what I want:</p>
  
  <blockquote>
    <p>The tab bar collects the needed tab
    bar items from the view controllers
    you specify.</p>
  </blockquote>
  
  <p>It also makes perfect sense that you do not setup up the tabBar in one place and the content in another. </p>
  
  <p><strong>But how do I define these items in my viewControllers which are all of type UINavigationController, with my custom ViewController as the rootController?</strong> </p>
  
  <p><strong>Is there some protocol besides the UITabBarControllerDelegate I need to implement?</strong></p>
  
  <p>Hope someone could point me in the right direction, I did not see this one coming:) Thanks</p>