iOS 7 and 8 seem to make the old ways of customizing UISegmentedControl not work entirely. I've been setting the divider images and everything like I always have in the past, but it appears that there are some new states that didn't exist in previous iOS versions, and as a result there are some weird visual effects.
Here's the code that I'm using
// Set divider images
self.setDividerImage(UIImage(named: "SegmentedControlNoneSelected"), forLeftSegmentState: .Normal, rightSegmentState: .Normal, barMetrics: .Default)
self.setDividerImage(UIImage(named: "SegmentedControlRightSelected"), forLeftSegmentState: .Normal, rightSegmentState: .Selected, barMetrics: .Default)
self.setDividerImage(UIImage(named: "SegmentedControlRightSelected"), forLeftSegmentState: .Normal, rightSegmentState: .Highlighted, barMetrics: .Default)
self.setDividerImage(UIImage(named: "SegmentedControlLeftSelected"), forLeftSegmentState: .Selected, rightSegmentState: .Normal, barMetrics: .Default)
self.setDividerImage(UIImage(named: "SegmentedControlBothSelected"), forLeftSegmentState: .Selected, rightSegmentState: .Highlighted, barMetrics: .Default)
self.setDividerImage(UIImage(named: "SegmentedControlBothSelected"), forLeftSegmentState: .Selected, rightSegmentState: .Selected, barMetrics: .Default)
self.setDividerImage(UIImage(named: "SegmentedControlBothSelected"), forLeftSegmentState: .Highlighted, rightSegmentState: .Selected, barMetrics: .Default)
self.setDividerImage(UIImage(named: "SegmentedControlBothSelected"), forLeftSegmentState: .Highlighted, rightSegmentState: .Highlighted, barMetrics: .Default)
self.setDividerImage(UIImage(named: "SegmentedControlLeftSelected"), forLeftSegmentState: .Highlighted, rightSegmentState: .Normal, barMetrics: .Default)
// Set background images
var normalBackgroundImage = UIImage(named: "SegmentedControlNormal")
self.setBackgroundImage(normalBackgroundImage, forState: .Normal, barMetrics: .Default)
var selectedBackgroundImage = UIImage(named: "SegmentedControlSelected");
self.setBackgroundImage(selectedBackgroundImage, forState: .Selected, barMetrics: .Default)
self.setBackgroundImage(selectedBackgroundImage, forState: .Highlighted, barMetrics: .Default)
self.setBackgroundImage(selectedBackgroundImage, forState: .Disabled, barMetrics: .Default)
self.setBackgroundImage(selectedBackgroundImage, forState: .Application, barMetrics: .Default)
self.setBackgroundImage(selectedBackgroundImage, forState: .Reserved, barMetrics: .Default)