1
嗨,我在定製的TabBar正在開發和部署我的目標是iOS4的UITabBar定製iOS中4
在iOS5的明智一切都很好。
在iOS4的明智不工作
代碼片段
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tabBack.png"]];
if ([[[UIDevice currentDevice] systemVersion] floatValue] > 4.9) {
//iOS 5
[self.tabBarController.tabBar insertSubview:imageView atIndex:1];
self.tabBarController.tabBar.selectionIndicatorImage =[UIImage imageNamed:@"red_Back.png"];
[[UITabBar appearance] setSelectedImageTintColor:[UIColor whiteColor]];
}
else {
//iOS 4
[self.tabBarController.tabBar insertSubview:imageView atIndex:0];
}
蔭嘗試了一些碼
1) Is there a way to use a custom selected image for UITabBarItem?
2) Really cool way to create custom UITabBar for iPhone app?
那些代碼示例
我嘗試了很多,沒有辦法做到在iOS4的這個任務沒有影響?
任何捷徑?
任何教程或例子請提前
感謝