uitableview contentInset issue

前端 未结 2 998
庸人自扰
庸人自扰 2021-02-15 10:36

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

2条回答
  •  深忆病人
    2021-02-15 11:21

    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);
    

提交回复
热议问题