問題描述
UILabel 不顯示所有內容 (UILabel not displaying everything)
我真的迷失了這個。
這是鏡頭:
Tea's Tea Matcha 的價格……正在被切斷。我根本不知道為什麼。
我正在使用 boundingRectWithSize:...
當我在調用 layoutIfNeeded 後記錄標籤框架的高度時,它應該是高度對於每個相應的框架:與 boundingRect.size.height 相同的高度。
另外,當我記錄標籤的文本時,價格在日誌中,所以也不是這樣。
它'
參考解法
方法 1:
I found I was able to fix the issue by changing the default height constraint constant. I lowered it significantly (it was large enough that it was touching the bottom of the Cell.xib view. I made it spaced closer to the view above it by 1 pixel, lowered the default height constraint constant in IB and changed the type from equals to greater than or equal to. These things combined (I'm not sure which if not all did it) seem to have fixed the problem.