contentInset偏移
2016-10-19 本文已影响37人
缭雾
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是全屏大小,滚动到最底会出现偏移。
