如何在ios 6中为UITabBarController的“更多”导航控制器设置背景图像
问题描述:
我想更改更多导航控制器的背景图像。我使用下面的代码进行搜索并尝试。如何在ios 6中为UITabBarController的“更多”导航控制器设置背景图像
我下面的代码,但`] 2
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.delegate=self;
tabBarController.moreNavigationController.delegate = self;
if ([tabBarController.moreNavigationController.topViewController.view isKindOfClass:[UITableView class]])
{
UIView* newView = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,367)];
UIImageView* imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bg.png"]];
imageView.opaque = NO;
imageView.alpha = 0.4;
[newView addSubview:imageView];
tabBarController.moreNavigationController.topViewController.view.backgroundColor = [UIColor clearColor];
tabBarController.moreNavigationController.topViewController.view.frame = CGRectMake(0,0,320,367);
//[newView addSubview:tabBarController.moreNavigationController.view];
[newView addSubview:tabBarController.moreNavigationController.topViewController.view];
tabBarController.moreNavigationController.topViewController.view = newView;
}
`] 2
试过的任何一个建议我要去的地方错可以理解
“谢谢“
答
[tabBarController.moreNavigationController.topViewController.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@“bg.png”]]];
请尝试在这里:http://*.com/questions/12150788/customize-the-more-uibarbuttonitem-in-uitabbar – shannoga 2013-04-08 06:26:23
尝试解决方案http://*.com/questions/10158059/adding-uibarbuttonitem-to -all-navigation-view-controllers-inside-a-uitabbarcontr – 2013-04-08 06:33:54
http://*.com/questions/6692517/change-navigation-bar-background-image-on-each-navigation – Spynet 2013-04-08 07:21:51