The following code snippet in the containing view controller also seems to solve the problem, without relying on explicit sizes:
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
self.mainScrollView.contentOffset = CGPointZero;
}
It does reset the content offset to the origin, but it seems that so do the other answers.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…