Matej Balantič
Matej Balantič

Reputation: 1807

The right way to make a custom UITabBar inside UITabBarController

I'm trying to create an app with UITabBarController, in order to use Cocoa's own memory and view controllers management for switching between different view controllers.

However I do need to make a very custom UITabBar, which after much Googling I found out is not possible. Several things are not possible with original UITabBar:

Is there any "legal" method of completely changing the design/subviews of TabBar but in the same time making use of UITabBarController and still getting app approved by Apple?

Thank you for your help.

Upvotes: 1

Views: 2137

Answers (2)

Abhishek Singh
Abhishek Singh

Reputation: 6166

Not much can be customized in tabbar but there are some good examples :-

  1. Custom Tabbar by iDevRecipes
  2. Custom TabBar by brianCollins

It might not be exactly what you need but will give you direction.

Upvotes: 1

crisisGriega
crisisGriega

Reputation: 862

About changing the size you can extend UITabBar and overwrite the function sizeThatFits. I'm sorry for not having an answer for the other points.

- (CGSize)sizeThatFits:(CGSize)size {
    CGSize auxSize = size;
    auxSize.height = 54; // Put here the new height you want
    return auxSize;
}

I will tell you as soon as I will discover it.

Upvotes: 1

Related Questions