tableView.contentInset = UIEdgeInsets.init(top: 0, left: 0, bottom: 50, right: 0)
tableView.scrollIndicatorInsets = UIEdgeInsets.init(top: 0, left: 0, bottom: 50, right: 0)
利用contentInset
可以实现滚动偏移效果。
如图:tableView是全屏大小,滚动到最底会出现偏移。

tableView.contentInset = UIEdgeInsets.init(top: 0, left: 0, bottom: 50, right: 0)
tableView.scrollIndicatorInsets = UIEdgeInsets.init(top: 0, left: 0, bottom: 50, right: 0)
利用contentInset
可以实现滚动偏移效果。
如图:tableView是全屏大小,滚动到最底会出现偏移。
本文标题:contentInset偏移
本文链接:https://www.haomeiwen.com/subject/xwfxuttx.html
网友评论