Is there a way I could make the text on a row occupy the whole space , depending on the mode (landscape or portrait ) without inserting a new line after each character at a certain index ?
This is how it looks on portrait mode;
And in landscape;
As you can see, in landscape mode, the text is not well formatted.
If you have a
UITableViewCellsubclass, you need to override thelayoutSubviewsmethod in your subclass.If you are adding subviews to your table cell in the
tableView:cellForRowAtIndexPath:method, uselabel.autoresizingMask = UIViewAutoresizingFlexibleWidthon your text label.If you are laying out the cell in Interface Builder, make sure you have set the autosizing anchors on the text label so that it expands when its superview expands. You will find the autosizing anchors in the fifth tab (the one with the image of a ruler) of the Utilities pane in Xcode 4.2.