Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
6.1+ と互換性のあるアプリで Dynamic Type をセットアップしようとしています。私は使用preferredFontForTextStyle:していますが、iOS <7.0で明らかにクラッシュします
preferredFontForTextStyle:
これにどのように対処していますか? respondsToSelector:フォント設定ごとに2つに分割しますか?
respondsToSelector:
より良い方法はありますか?
前もって感謝します!
私はこれについて考えてきました。アプリが iOS 6 で実行されている場合、実行時preferredFontForTextStyle:にクラスにメソッドを手動で追加し、そこで適切なシステム フォント サイズを動的に選択するのがおそらく最善の方法です。UIFontgithub の UI7Kit プロジェクトは、他のメソッドに対してこのようなことを行いますが、残念ながらこれはそうではありません。
UIFont