NSDictionary
*dic = [
NSDictionary
dictionaryWithObjectsAndKeys
:[
UIColor
blackColor
],
UITextAttributeTextColor
,[
UIFont
fontWithName
:
@"AppleGothic"
size
:14],
UITextAttributeFont
,
nil
];
//
设置各种状态的字体和颜色
[
self
.
segmentedControl
setTitleTextAttributes
:dic
forState
:
UIControlStateNormal
];
转载于:https://www.cnblogs.com/melons/p/5792039.html