Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 UISegment 控制器,在这个控制器中,我想将选定的段控制器选项卡颜色更改为橙色。其他选项卡将是正常的灰色。请帮助我如何实现这一目标。
使用它的简单方法 UISegmentedControl appearance
UISegmentedControl appearance
[[UISegmentedControl appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor orangeColor],UITextAttributeTextColor, nil] forState:UIControlStateSelected];