Reputation: 1842
I heard that if you move tab bar from bottom your your app will be rejected as it's against their policy but i want to modify the height and add a admob banner view and some buttons It will be rejected if I do this?
Upvotes: 1
Views: 6702
Reputation: 121
And what about contentViewController? Because if you change heigth (and move position.y), you should increase viewcontroller size too, isn't it?
Upvotes: 1
Reputation: 1819
Your app might not be rejected. Just because you change the control object of tab doesn't mean any security issues. For example, apple's own app store app on iPad is a tab bar controller, but the control object is uisegmentcontrol
object.
You can hide or change the tab bar in a tab bar controller very easily. The following code should explain it easily.
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.tabBar.hidden = YES;
for(UIView *view in self.view.subviews) {
if([view isKindOfClass:[UITabBar class]]) {
[view setFrame:CGRectMake(view.frame.origin.x, self.view.frame.size.height+49, view.frame.size.width, view.frame.size.height)];
}
else {
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, self.view.frame.size.height)];
}
}
}
Also I suggest you give more thought to this method. Container Controllers.
However, if apple rejects you can change things very easily. Don't worry a lot to try something new. Maybe apple will get your idea and pay you some royalty to use even :P.
Upvotes: 2
Reputation: 8444
AFAIK, it's not possible to modify the height. You have to customize the tabbarcontroller
to achieve this.
Try the sample project for this in Github.
Upvotes: 1
Reputation: 13783
You can change the tabBar height like this:
CGRect viewFrame=self.tabBar.frame;
//Sample parameters, add what fits your needs
viewFrame.origin.y -=30;
viewFrame.origin.x -=10;
viewFrame.size.height=150;
viewFrame.size.width=200;
self.tabBar.frame=viewFrame;
This is for UITabBar not tabBarController in case you created a tab-based project.
Upvotes: 2