怎么去掉UISegmentedControl的边框颜色
1个回答
推荐于2016-04-14 · 知道合伙人互联网行家
关注
展开全部
segment.tintColor = [UIColor clearColor];//去掉颜色,现在整个segment都看不见
NSDictionary* selectedTextAttributes = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:16],
NSForegroundColorAttributeName: [UIColor whiteColor]};
[segment setTitleTextAttributes:selectedTextAttributes forState:UIControlStateSelected];//设置文字属性
NSDictionary* unselectedTextAttributes = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:16],
NSForegroundColorAttributeName: [UIColor lightTextColor]};
[segment setTitleTextAttributes:unselectedTextAttributes forState:UIControlStateNormal];
NSDictionary* selectedTextAttributes = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:16],
NSForegroundColorAttributeName: [UIColor whiteColor]};
[segment setTitleTextAttributes:selectedTextAttributes forState:UIControlStateSelected];//设置文字属性
NSDictionary* unselectedTextAttributes = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:16],
NSForegroundColorAttributeName: [UIColor lightTextColor]};
[segment setTitleTextAttributes:unselectedTextAttributes forState:UIControlStateNormal];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询