问题
I'm trying to make make the top border of a UI segmented control one color and the bottom border of a UISegmented control another color. I can do it with a UIView, but it doesn't work correctly with a segmented control for some reason.
回答1:
I suggest you to use custom divider images.
Please refer either to "Customizing appearance of UISegmentedControl" article or "UIKit User Interface Catalog" topic.
来源:https://stackoverflow.com/questions/33403841/how-do-you-customize-the-border-of-a-uisegmentedcontrol-in-swift