[英]How to change background image of tab bar item in ios?
I want to change the background of tab bar item with some image . 我想用一些图像更改标签栏项目的背景。 Can anyone help me out in this regard? 在这方面有谁可以帮助我?
Here is what i wanted : 这就是我想要的:
Also i need to know what should be the size of background image . 另外我需要知道背景图像的大小应该是多少。 My images are getting out of bound 我的图像越界了
To change background colour of UITabBar
要更改UITabBar
背景颜色
TabBarController* Tcontroller =(TabBarController*)self.window.rootViewController;
Tcontroller.tabBar.barTintColor=[UIColor greenColor];
您应该根据自己的数量计算您的tabbaritem的图像大小,例如,如果您有4个标签项:每个项目的宽度将是屏幕宽度的1/4,高度是平板电脑高度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.