ios - 如何更改 ios 中标签栏项目的背景图像?

标签 ios uiimage uitabbarcontroller uitabbaritem

我想用一些图片改变标签栏项目的背景。 任何人都可以在这方面帮助我吗?

这是我想要的:

enter image description here

我还需要知道背景图片的大小。我的图片越界了

enter image description here

最佳答案

改变UITabBar的背景颜色

TabBarController* Tcontroller =(TabBarController*)self.window.rootViewController;
Tcontroller.tabBar.barTintColor=[UIColor greenColor];

关于ios - 如何更改 ios 中标签栏项目的背景图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36861096/

相关文章:

ios - 使用 iOS Simulator 模拟 iPad 1

ios - 触摸时如何使图像扩展到全屏?

ios - 如何从 iphone 中的单个 viewcontroller 停止 tabbar 的三个 viewcontroller 中的计时器?

ios - UIImageWriteToSavedPhotosAlbum 阻塞主线程

iphone - 从 UILabel 创建 UIImage?

ios - 如何通过代码设置UITabBar的选中项

IOS6 UITabBarController didSelectViewController 事件

ios - 隐藏/显示 UITabBarController 的 .tabBar(用于 Root View Controller )

ios - GMSMapView 总是显示相同的位置 iOS

javascript - Meteor Cordova iOS 视频元素未加载捕获的视频