Change font size of UISegmentedControl

前端 未结 16 1843
死守一世寂寞
死守一世寂寞 2020-11-28 20:54

Can anyone please tell me how can I change the font type and size of UISegmentedControl?

16条回答
  •  时光说笑
    2020-11-28 21:05

    Swift 4

    let font = UIFont.systemFont(ofSize: 16)
    UISegmentedControl.setTitleTextAttributes([NSFontAttributeName: font], for: .normal)
    

提交回复
热议问题