当我收到将标签栏的背景图像更改为自定义图像的请求时,我做了一个标签栏iOS项目。该项目是为iOS 4.x开发的,因此iOS5的 [tabBar setTabBarBackgroundImage:[UIImage imageNamed:@"custom.jpg"]]
不起作用。你能提出一些简单的解决方案吗(如果有可能,我不想改变整个项目)?自定义标签栏背景图像 - 在iOS 4.x
编辑:代码 三线仅是可以解决所有:
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"customImage.png"]];
[self.tabBarController.tabBar insertSubview:imageView atIndex:0];
[imageView release];
谢谢你,这是一个有益的想法:) – MMMM 2012-01-03 09:55:50