I have a subclass of UITableViewCell containing a UITextView where scrolling is disabled. I set its frame like this, in my layoutSubviews table view method in the table:
CGRect frame = self.bodyTextView.frame; CGSize size = self.bodyTextView.contentSize; frame.size = size; self.bodyTextView.frame = frame;
This has been working fine for some time, but I noticed that in the case when I have a particularly large amount of text, the text is cropped. I set the background color of the text frame to orange to check if the frame was set correctly. Here is an example (I show only the bottom of the text view):

The frame is the correct size based on the text (in this case 1019 pixels), but the text stops in front of the bottom of the text view. I also saw how the text is cut off partially through the line (i.e. the text of the last visible line of text is cut off halfway horizontally). Does anyone know what is going on here?
A few other points:
- Text views work well for all table view cells with shorter content.
- If I increase the amount of text in the above example, the height of the text view increases, but the text is still turned off in the same place.
ios cocoa-touch uitableview uitextview uiscrollview
Darren May 30 '13 at 12:49 2013-05-30 12:49
source share