0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

カスタムUIFontが適用されない

Posted at

状況

カスタムフォントを使いたい

とりあえず、

  1. プロジェクトにフォントファイル(.otf, .ttf)を挿入
  2. 挿入したフォントのプロジェクトターゲットを指定
  3. プロジェクトのbundleにフォントが入っているか確認
  4. Info.plistに新しいrowを追加

と、手順として一般的な方法を実行したがカスタムフォントが適用できない..

結論(というかよくあるであろうミス)

正しいInfo.plistに書く!

Info.plistのパスを確認してみてください。
Info.plistは同じ名前でテスト用の別ファイルが存在したりするので要注意です

僕はここでドハマリしたので共有させていただきます..

参考サイト

https://stackoverflow.com/questions/30554758/cannot-add-custom-font-to-xcode
https://developer.apple.com/documentation/uikit/text_display_and_fonts/adding_a_custom_font_to_your_app
https://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?