1
A
回答
1
我不認爲有這樣做的直接方式。你將不得不在這裏創造透明度的幻覺。一種方法是在標籤欄中設置圖像。您可以在UITabBarController
添加下列類別,並調用它
- (void) setBackgroundImage:(UIImage *)image
{
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,480)];
imageView.backgroundColor = [UIColor colorWithPatternImage:image];
[self.view addSubview:imageView];
[self.view sendSubviewToBack:imageView];
[self.view setOpaque:NO];
[self.view setBackgroundColor:[UIColor clearColor]];
}
另一種方式(圖像方式僅:)):
UIImage *tabBarBackground = [UIImage imageNamed:@"tabBarBackground.png"];
[[UITabBar appearance] setBackgroundImage:tabBarBackground];
[[UITabBar appearance] setSelectedImageTintColor:[UIColor colorWithRed:127.0/255.0 green:186.0/255.0 blue:235.0/255.0 alpha:1.0]];
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"tabBarItemSelected.png"]];
相關問題
- 1. 如何訪問
- 2. 如何訪問
- 3. 如何訪問
- 4. 如何訪問android.os.storage.IMountService?
- 5. 如何訪問JPanel?
- 6. 如何訪問Hashie
- 7. 如何訪問ID?
- 8. 如何javadoc訪問?
- 9. 如何訪問RecyclerView
- 10. 如何訪問XSL
- 11. 如何訪問角
- 12. 如何訪問HttpContext.Current.Application
- 13. 如何訪問RIL.java?
- 14. 如何訪問navigator.getUserMedia()?
- 15. 如何訪問system32?
- 16. 如何訪問FSharp.Data.JsonExtensions?
- 17. 如何訪問masterpage.master.cs
- 18. 如何訪問笨
- 19. 如何訪問GetGlobalResourceObject()
- 20. 如何訪問protobufs
- 21. 如何訪問EAAccessories?
- 22. 如何訪問ListViewItem?
- 23. 如何訪問RadPane
- 24. MS-訪問 - 如何
- 25. 如何訪問NSDictionnary
- 26. 如何訪問PreparingDeviceSettingEventArgs.GraphicsDeviceInformation.GraphicsProfile?
- 27. NSMutableArray - 如何訪問
- 28. 如何訪問Validation.Errors.Count?
- 29. 如何訪問viewDivLoad
- 30. 如何訪問ListBoxItems
你可以簡單地用一個透明的圖像,使用設置的TabBar的背景視圖 –