I am trying to display a Label and a button side-by-side in a UITableViewCell. The button sits at the right end & the Label sits at the left end. The label can host a long text and should get truncated if the text would flow out of bounds (I do not want to reduce the font size, etc.). Needless to say, I want this to work for both the orientations.
If I use UITableViewCellStyleDefault (without adding a button) & set a long text for the default label, I observe that the label auto-resizes perfectly when the orientation changes. Most probably because its autoresizingMask is set to
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleRightMargin.
I finally went with subclassing
UITableViewCell & overriding
layoutSubViews. Thanks Mark!