segmentedConctrol.setDividerImage(UIImage(), forLeftSegmentState: .normal, rightSegmentState: .normal, barMetrics: .default)

        

        segmentedConctrol.setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.white, NSFontAttributeName: UIFont.boldSystemFont(ofSize: 17)], for: .selected)

        segmentedConctrol.setTitleTextAttributes([NSForegroundColorAttributeName: UIColor(r: 102, g: 102, b: 102), NSFontAttributeName: UIFont.boldSystemFont(ofSize: 17)], for: .normal)

        

        segmentedConctrol.borderWidth = 1

        segmentedConctrol.borderColor = segmentedConctrol.backgroundColor

 

參考資料:

http://stackoverflow.com/questions/36467985/how-to-append-attributed-text-string-with-attributed-string-in-swift

arrow
arrow
    全站熱搜

    小賢 發表在 痞客邦 留言(0) 人氣()