【发布时间】:2011-12-08 10:44:21
【问题描述】:
您好,有人可以帮我编写这段代码吗?我有带有自定义标签栏图像的应用程序,现在在 iOS5 中图像消失了。我知道他们已经对标签栏的实现进行了更改,我不知道如何解决这个问题。
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window makeKeyAndVisible];
CGRect frame = CGRectMake(0, 0, 400, 148);
UIView *viewa = [[UIView alloc] initWithFrame:frame];
UIImage *tabBarBackgroundImage = [UIImage imageNamed:@"fasha-down.png"];
UIColor *color = [[UIColor alloc] initWithPatternImage:tabBarBackgroundImage];
[viewa setBackgroundColor:color];
[[tabBarController tabBar] insertSubview:viewa atIndex:0];
[color release];
[viewa release];
[window addSubview:tabBarController.view];
}
感谢您的帮助
【问题讨论】:
标签: iphone xcode image background ios5