开发者

How to set up different colors for UISegmentedControl buttons?

开发者 https://www.devze.com 2022-12-29 17:50 出处:网络
I have an开发者_JAVA百科 UISegmentedControl with two buttons. I want each button of control to have specific color of borders and title.

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

精彩评论

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