Add Border to UISegmentedControl
问题 how can i set a border with a color to a UISegmentedControl ? I'm getting this by default (incorrect): I was trying this but nothing happens UISegmentedControl.appearance().layer.borderWidth = 1.0 UISegmentedControl.appearance().layer.cornerRadius = 5.0 UISegmentedControl.appearance().layer.borderColor = UIColor.white.cgColor UISegmentedControl.appearance().layer.masksToBounds = true i want to achieve this border (correct): 回答1: I use this function to alter my SegmentedControl: func