In a Uisegmentedcontrol control, there is one that sets the default color
The Tintcolor is inherited through the Superview hierarchy. UIView for more information.
@property (Null_resettable,nonatomic,strong) Uicolor *tintcolor;
、
The use of the following methods:
[_segmentedcontrol Settintcolor:[uicolor Whitecolor]];
-Set the background color when selected
[_segmentedcontrol setbackgroundimage:[uiimage imagenamed:@ "selectimg"]
forstate:uicontrolstateselected Barmetrics:uibarmetricsdefault];
-set to the background color when selected
[_segmentedcontrol setbackgroundimage:[uiimage imagenamed:@ "unselectimg"]
forstate:uicontrolstatenormal Barmetrics:uibarmetricsdefault];
-Set Font color when selected
Nsdictionary *dic = [Nsdictionary Dictionarywithobjectsandkeys:rgba (.), Uitextattributetextcolor,nil];
[_segmentedcontrol settitletextattributes:dic forstate:uicontrolstateselected];
-Set Default font color
Nsdictionary *dics = [nsdictionary dictionarywithobjectsandkeys:[uicolor whitecolor],uitextattributetextcolor,nil];
[_segmentedcontrol settitletextattributes:dics Forstate:uicontrolstatenormal];