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.
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.
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.
So. Is there a way to use my subclassed UITabBar in my UITabBarController?
For example. Let's assume I take the solution from this thread changing the height of UITabBar in iOS7/8?
@implementation MyTabBar
-(CGSize)sizeThatFits:(CGSize)size
{
CGSize sizeThatFits = [super sizeThatFits:size];
sizeThatFits.height = 100;
return sizeThatFits;
}
@end
Now. How can I use this class (MyTabBar) as the tab bar of choice in my programmatically built UITabBarController.
The first thought I had was to do something like
self.tabBar = [[MyTabBar alloc] init];
But the property is readonly.