Attributed string with custom fonts in storyboard does not load correctly

后端 未结 16 1989
梦谈多话
梦谈多话 2021-01-30 03:35

We are using custom fonts in our project. It works well in Xcode 5. In Xcode 6, it works in plain text, attributed string in code. But those attributed strings set in storyboard

16条回答
  •  情深已故
    2021-01-30 04:10

    that's have a simple and quick solition and that's work in my case . that solution is add a code line in didFinishLaunchingWithOptions func in AppDelegate.swift file :

    for textViews :

    UITextView.appearance().font = UIFont(name: "IranSans", size: 17)
    

    for labels :

    UILabel.appearance().font = UIFont(name: "IranSans", size: 17)
    

    and for rest of UiView like this two ☝️

提交回复
热议问题