1
votes

I want to change the height of Tabbar.

the code is :

    rootController.tabBar.frame= CGRectMake(0,450,320,30);

rootController is TabBarController Object.

here I am getting the space between my view & tabbar after resizing the tabbar.

then Its of no use to resize it. How to resize it properly so that space between myview & tabbar can be eliminated ?

|--------------------|
|
|
|
|
|
|........................|here between view & my tabbar space remains
|........................|
| view1 | view2 |
|--------------------|

Is there any solution? Thanks in advance ...

2

2 Answers

5
votes

I'm pretty sure the tabbar isn't designed to be resized. Apple want a consistent size and look with these kinds of things.

0
votes

Try the code in your rootController:

//CUSTOM TABBAR!!
//change tabbar's height
float windowheight = [UIScreen mainScreen].bounds.size.height;
self.tabBar.frame = CGRectMake(0, windowheight - 30, 320, 30);

//here you can see the UITransitionView's bounds before changed.
NSLog(@"subView=%@", [self.view subviews]);

//change UITransitionView 's height 
((UIView *)[[self.view subviews] objectAtIndex:0]).frame = CGRectMake(0, 0, 320, windowheight - 30);

//then add your CustomTabBarView