// 矫正TabBar图片位置,使之垂直居中显示
CGFloat offset = 5.0;
for (UITabBarItem *item in self.tabbar.items) {
item.imageInsets = UIEdgeInsetsMake(offset, 0, -offset, 0);
}
TabbarItem没有文字,图片居中
最新推荐文章于 2020-12-27 22:47:01 发布
// 矫正TabBar图片位置,使之垂直居中显示
CGFloat offset = 5.0;
for (UITabBarItem *item in self.tabbar.items) {
item.imageInsets = UIEdgeInsetsMake(offset, 0, -offset, 0);
}