I have an auto-layout (constraint) based application and noticed that there is a problem with a tableview after an orientation change. The repro steps are as follows (I have
I have found that the answers above work most of the time but not all of the time. The most robust solution is to subclass UITableView and set the contentSize within layoutSubviews:
- (void)layoutSubviews
{
[super layoutSubviews];
CGSize contentSize = self.contentSize;
contentSize.width = self.bounds.size.width;
self.contentSize = contentSize;
}