How can we disable the effect of enabled “bold text” from settings in the iphone (in my app)? - swift 2.0

試著忘記壹切 提交于 2019-12-06 07:37:19

If your Bar Button Item is using default(System) font, and if the user enable bold text, your screen text changes Bold. Customize font of your bar button item with regular text.

let barButton = UIBarButtonItem.appearance()
if let font = UIFont(name: "HelveticaNeue", size: 19) {     
    barButton.setTitleTextAttributes([NSFontAttributeName: font], forState: UIControlState.Normal) 
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!