设定UISegmentControl中选中和未选中的segment的文字的属性,包括font, textcolor, shadowcolor.
UIFont *font = [UIFontType06];
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:font,UITextAttributeFont,
[UIColor grayColor],UITextAttributeTextColor,
[UIColorcolorFromHex:0x333333],UITextAttributeTextShadowColor,
nil];
[self.segControl setTitleTextAttributes:attributes forState:UIControlStateNormal];
NSDictionary *selectedAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
font,UITextAttributeFont,
[UIColor whiteColor],UITextAttributeTextColor,
[UIColorcolorFromHex:0x333333],UITextAttributeTextShadowColor,nil];
[self.segControl setTitleTextAttributes:selectedAttributes forState:UIControlStateSelected];