1. 程式人生 > >iOS中如何修改UISegmentedControl的背景顏色和字型的顏色UISegmentedControl

iOS中如何修改UISegmentedControl的背景顏色和字型的顏色UISegmentedControl

segmentedControlStyle在iOS7 之後設定沒有效果了

那麼如何快速的設定

UISegmentedControl的背景顏色呢?

#define RGBACOLOR(r, g, b, a)   [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]


segmentController.tintColor=RGBACOLOR(123, 203, 184, 1);

這兩句話就可以搞定了