@
zhlooking 移动轮播很麻烦吗?
```
override func viewDidLoad() {
super.viewDidLoad()
tableView.contentInset = UIEdgeInsets(top: topView.frame.height, left: 0, bottom: 0, right: 0)
tableView.scrollIndicatorInsets = UIEdgeInsets(top: topView.frame.height, left: 0, bottom: 0, right: 0)
}
func scrollViewDidScroll(scrollView: UIScrollView) {
var rect = topView.frame
let offset = -scrollView.contentOffset.y
let topBarheight = self.navigationController?.navigationBar.frame.height ?? 0
if offset < (topBarheight + rect.height) {
rect.origin.y = offset - topView.frame.height
} else {
rect.origin.y = topBarheight
}
topView.frame = rect
}
```
知乎的实现方法好像不是这样(观察 Indicator 的位置),不过效果差别不大