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 の最後の行を切り捨てる必要があるかどうか、および「NSLineBreakByTruncatingTail」が実際に使用されているかどうかを確認しようとしています。末尾の切り捨てが視覚的にわかりますが、「NSLineBreakByTruncatingTail」が必要かどうかの条件を作成したいと考えています。
これは可能ですか?
フォント属性とテキストに基づいてサイズを計算し、boundingRectWithSizeそれをラベルのサイズと比較できます。
boundingRectWithSize