當我收到將標籤欄的背景圖像更改爲自定義圖像的請求時,我做了一個標籤欄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