ChenYilong / CYLTabBarController

[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
MIT License
6.92k stars 1.46k forks source link

TabBarItem只显示图标,图标未居中 #148

Closed XIAODINGPA closed 7 years ago

XIAODINGPA commented 7 years ago

Base Info for this issue

  1. Version:v1.10.0

  2. Language:Objective-C

  3. iOS System Version:iOS10

  4. Prototype(是否是真机):YES tabbar

  5. Issue Type:Crash、Bug、Enhancement(希望能支持一个新需求)、Q-A

1. How to repeat the problem.

这样设置也无效 tabBarController.imageInsets = UIEdgeInsetsMake(4.5, 0, -4.5, 0); tabBarCtroller.titlePositionAdjustment = UIOffsetMake(0, MAXFLOAT); 真机和模拟器,图标都无法居中

2. Please help me in this way.

3. Here is a Demo.

4. Here is my Debug log

image

ChenYilong commented 7 years ago

请更新到v1.11.0,我更新了API。

ChenYilong commented 7 years ago

@XIAODINGPA 后来更新没?解决问题没有?

XIAODINGPA commented 7 years ago

不好意思啊,UI给的@2x图片是64x64的,我用你demo例子里面48x48的图是居中的,应该是图片图片尺寸的问题,换成48x48解决了。

XIAODINGPA commented 7 years ago

不好意思呀,UI给的2倍图是64x64的,我用你demo里面的48x48的图居中是没问题的,更换图片尺寸就解决了