iOS标签栏图标不断变大 [英] iOS Tab Bar icons keep getting larger

查看:196
本文介绍了iOS标签栏图标不断变大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 tabBar 中遇到问题。



重复点击同一个标签栏按钮将继续增加标签栏图标的大小。

如果我推一个不同的,它会回到其原始大小。



解决方案



<

根据OP共享的项目(查看问题评论),看起来标签栏图片内容似乎在混乱。






解决问题的步骤:




  1. 选择有问题的标签栏项目 ViewController 在IB中

  2. 前往尺寸检查器部分(右侧 b $ b
  3. 确保您的图像插入是平衡的

    • 如果您将5px插入到顶部,然后在底部插入一个-5像素的插图

    • 如果您向左输入5像素插入,则向右插入一个-5像素的插图。



$ b b

我没有这个解释,对不起...但是如果有任何人,那么请评论/发布


I am having a problem with my icons in my tabBar.

Tapping the same tab bar button repeatedly will keep increasing the tab bar icon's size.
If I push a different one, it goes back to its original size.

Any ideas what I should fix?

解决方案

As per the project shared by the OP (see question comments), it seems the tab bar image insets seem to be messing things up.


Steps to resolve the issue:

  1. Select the tab bar item of the problematic ViewControllers in IB
  2. Go to Size Inspector section (on the right)
  3. Ensure your image insets are balanced
    • If you give 5px inset to top then balance with a -5px inset to bottom
    • If you give 5px inset to left then balance with a -5px inset to right

I have no explanation for this, sorry... but if anyone does then kindly comment/post

这篇关于iOS标签栏图标不断变大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆