UITabBarItem 更改图像的高度和宽度

来源:互联网 发布:阿里云缩写 编辑:程序博客网 时间:2024/06/05 19:17
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController; UITabBar *tabBar = tabBarController.tabBar; UITabBarItem *tabBarItem1 = [tabBar.items objectAtIndex:0]; UITabBarItem *tabBarItem2 = [tabBar.items objectAtIndex:1]; UITabBarItem *tabBarItem3 = [tabBar.items objectAtIndex:2]; //add image to tabbarItems tabBarItem1.imageInsets = UIEdgeInsetsMake(0, -10, -6, -10);
0 0
原创粉丝点击