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.
タイトルで述べたように、テキストを水平方向と垂直方向の両方で UILabel の中央に配置したいと思います.. 呼び出すsize to fitと垂直方向に整列でき、水平方向に整列できますがsetAdjustsFontSizeToFitWidth 、両方を一緒に使用すると互いに打ち消し合うようです..
size to fit
setAdjustsFontSizeToFitWidth
緑色の部分が UILabel で、赤色がテキストです。
画像に見られるようにテキストを縦に揃えたいと思います ありがとうございます!