开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜