title: Programmatically change class of UITabBarControllers tabBar property
body: <p>Basically I want to change the height of the tab bar, and to do so, I've found multiple solutions that works by subclassing the UITabBar.</p>
  
  <p>However to actually use that subclass in a tab controller they (the people in other SO threads) seem to tell me to change it (the subclass) in the storyboard. But the app I am working creates the tab controller programmatically, so I am therefore unable to change the subclass in storyboard.</p>
  
  <p>Here is an example of a SO question where the solution is posted, however it uses the storyboard to use the new tab bar controller subclass.</p>
  
  <p>So. Is there a way to use my subclassed UITabBar in my UITabBarController?</p>
  
  <hr>
  
  <p>For example. Let's assume I take the solution from this thread <a href="https://stackoverflow.com/questions/24397189/changing-the-height-of-uitabbar-in-ios7-8/27494228#27494228">changing the height of UITabBar in iOS7/8?</a></p>
  
  <pre><code>@implementation MyTabBar
  
  -(CGSize)sizeThatFits:(CGSize)size
  {
      CGSize sizeThatFits = [super sizeThatFits:size];
      sizeThatFits.height = 100;
  
      return sizeThatFits;
  }
  
  @end
  </code></pre>
  
  <p>Now. How can I use this class (MyTabBar) as the tab bar of choice in my programmatically built UITabBarController.</p>
  
  <p>The first thought I had was to do something like</p>
  
  <pre><code>self.tabBar = [[MyTabBar alloc] init];
  </code></pre>
  
  <p>But the property is readonly.</p>