I have strange issue with contentInsent
. I am implementing \"Pull & release\" to refresh on UITableView and everything works fine, but in some cases I would lik
this gives better results:
CGFloat offset = scrollView.contentOffset.y;
scrollView.contentInset = UIEdgeInsetsMake(60.0f, 0.0f, 0.0f, 0.0f);
scrollView.contentOffset = CGPointMake(0, offset);
OK, so I found the answer by playing a bit with different values. Turnes out that in the case described above besides setting contentInset
you have to also setup contentOffset
. In my case the following code worked:
scrollView.contentInset = UIEdgeInsetsMake(60.0f, 0.0f, 0.0f, 0.0f);
scrollView.contentOffset = CGPointMake(0.0f, -60.0f);