修改文字位置
if (@available(iOS 13.0, *)) {
UITabBarAppearance *appearance = UITabBarAppearance.new;
UITabBarItemStateAppearance *normal = appearance.stackedLayoutAppearance.normal;
if (normal) {
normal.titlePositionAdjustment = UIOffsetMake(0, -3);
}
self.tabBar.standardAppearance = appearance;
}
修改图片位置
childVC.tabBarItem.imageInsets = UIEdgeInsetsMake(-5, 0, 0, 0);
网友评论