美文网首页iOS实际开发遇到的那些事儿
更改contentInset时MJRefresh怎么回归你想要得

更改contentInset时MJRefresh怎么回归你想要得

作者: 那夜倚楼听风雨 | 来源:发表于2018-07-05 16:35 被阅读29次

当我们更改UICollectionView,UITableView的contentInset属性的时候,由于MJRefresh是按照(0,0)位置来计算的,所以需要继承一个他的下拉控件,重写placeSubviews方法就可以了。

    [super placeSubviews];
    // 设置y值
    self.mj_y = - self.mj_h - height;
}

相关文章

网友评论

    本文标题:更改contentInset时MJRefresh怎么回归你想要得

    本文链接:https://www.haomeiwen.com/subject/skbpuftx.html