How do you customize the border of a UISegmentedControl in swift

♀尐吖头ヾ 提交于 2019-12-13 08:14:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!