![](/img/trans.png)
[英]How to customise the UINavigationBar that appears when there are too many UITabBar items?
[英]how to customise UISegmentedControl items
如何使用不同類型的訂單(而不是矩形圖像)自定義UISegmentedControl項目,以及如何更改選定狀態的圖像。
您可以使用UIImage設置背景圖像。
- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics
這里有一個很棒的教程: http : //www.raywenderlich.com/21703/user-interface-customization-in-ios-6
請參閱Apple文檔: UISegmentedControl 。 Apple已經提供了用於自定義此控件的文檔。
除此之外,這里還有一些其他的教程鏈接:
http://techblog.chegg.com/2013/01/11/customizing-appearance-of-uisegmentedcontrol/
http://www.raywenderlich.com/21703/user-interface-customization-in-ios-6
希望這可以幫助。
我使用PLSegmentView從這里可用。 它允許您簡單地交換常規的UISegmentedControl並為每個段的兩個狀態的每個狀態提供一個圖像。 效果很好。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.