简体   繁体   English

如何删除UITabBarItem下面的空间

[英]How to remove space below the UITabBarItem

I'm creating app that contain tabBar. 我正在创建包含tabBar的应用程序。 In tabBar 64*64 and 32*32 images sated to tabBarItem. 在tabBar中,指定给tabBarItem的64 * 64和32 * 32图像。 But it will by default leave some space below of image. 但默认情况下,它将在图像下方保留一些空间。 Like this, 像这样, 在此处输入图片说明

How can I remove this space. 如何删除该空间。

Thanx for help. 感谢您的帮助。

Apple document sayas tabbar Items mostly size if 30 * 30 see:- Apple文档sayas选项卡如果尺寸为30 * 30,则项目的大小大多为-

在此处输入图片说明

https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW1 https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW1

so you just need to set your tabbar items icon with images is 48x32 pixels may be your issue getting fix. 因此,您只需要设置标签栏图标的图像为48x32像素,这可能是您解决问题的方法。

Tab bar images always line up with thetop of the tabbar. 标签栏图像始终与标签栏的顶部对齐。 If you want to make them have space above and below, you put that space in the icon. 如果要使它们的上方和下方都有空间,请将该空间放在图标中。

So, you need to make your image taller and leave blank space on the top of your image. 因此,您需要使图像更高,并在图像顶部保留空白。

The images should be 60x60 and 120x120, then they'll fit better. 图片应为60x60和120x120,这样它们会更合适。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM