Space between custom UITabBar and ViewController

心不动则不痛 提交于 2019-12-03 07:46:43

Change your UITabBarController's subviews to a full-sized frame, this worked for me:

[[yourTabBarController.view.subviews objectAtIndex:0] setFrame:CGRectMake(0, 0, 320, 480)];

Try creating your own class extending from UITabBar and use this function:

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

This will resize the UITabBar to the size you want. Simple and easy.

Mike

If changing the frame like @JoaT mentioned doesn't work make sure the view controller's view has the correct autoresizing mask set.

This SO link may be helpful.

I tried by changing the height and origin of tabbar, for me it worked properly.You can try by increasing the height of your viewcontroller.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!