How to set up different colors for UISegmentedControl buttons?
I have an开发者_JAVA百科 UISegmentedControl
with two buttons. I want each button of control to have specific color of borders and title.
Is is possible and if yes how it can be archived?
You can use segmentedControlStyle
property. Which gives you 3 different styles
UISegmentedControlStylePlain, UISegmentedControlStyleBordered, UISegmentedControlStyleBar
. If you want any other appearance, you'll need to make a custom control.
Doc: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UISegmentedControl_Class/Reference/UISegmentedControl.html#//apple_ref/occ/instp/UISegmentedControl/segmentedControlStyle
精彩评论