See here you have to first save the scrolled position of tableView
i.e. contentOffset
of tableView
and then reuse it when you are coming back to tableView
.
1)When and where you will save it :
When : At the point, when you are drilling down to detailViewController
save the contentOffset
of tableView
How : float verticalContentOffset = tableView.contentOffset.y;
2) How will you set tableView back to the same scrolled position :
[tableView setContentOffset:CGPointMake(0, verticalContentOffset)];
Hope this will help you.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…