Ios7 在iOS 7中自定义UISegmentedControl

Ios7 在iOS 7中自定义UISegmentedControl,ios7,uisegmentedcontrol,Ios7,Uisegmentedcontrol,如何改变 1.选定段颜色 2.取消选择段颜色 3.边框颜色 4.文本颜色 对于选定或取消选定的UISegmentedControl: for (int i=0; i<[sender.subviews count]; i++) { if ([[sender.subviews objectAtIndex:i]isSelected] ) { UIColor *tintcolor=[UIColor colorWithRed:127.0

如何改变 1.选定段颜色 2.取消选择段颜色 3.边框颜色 4.文本颜色


对于选定或取消选定的UISegmentedControl

   for (int i=0; i<[sender.subviews count]; i++) 
{
    if ([[sender.subviews objectAtIndex:i]isSelected] ) 
    {               
    UIColor *tintcolor=[UIColor colorWithRed:127.0/255.0 green:161.0/255.0 blue:183.0/255.0 alpha:1.0];
    [[sender.subviews objectAtIndex:i] setTintColor:tintcolor];
    }
   else 
    {
        [[sender.subviews objectAtIndex:i] setTintColor:nil];
    }
}
for(int i=0;i