问题
I am determining the height of my cells dynamically, to fit all my text.
I also set the number of lines to 0.
It works most of the time but sometimes I get things like this:

There is more text than is shown, and even if I log the label text, it shows more that what is being displayed.
The black frame is used to show that the frame is big enough to hold the text but for some reason the label refuses to show all my text.
Has anyone experienced anything like this?
Can anyone help me solve this?
I know it's not complicated but its been driving me crazy.
回答1:
In this instance, it is very important to use the correct function to measure the size of your text. Check out this blog post: Calculating Height of Multi-Line Text on the iPhone SDK.
回答2:
The solution was actually very simple, for some reason, the number of lines was being changed, so now I only make sure that before the cell is displayed, the number of lines for the label is in fact 0.
Thank you all for the help!
来源:https://stackoverflow.com/questions/7252428/uilabel-does-not-show-all-my-text-and-it-also-doesnt-show-that-there-is-more