TableView滚动指示器重叠标题

Jac*_*nkr 2 uitableview uiscrollview ios ios5

iPhone应用程序表头

情况:

TableView做我需要做的所有事情,因为它

  1. 让我为其中的行设置动画(使用很难完成UIView
  2. 允许顶部非滚动标题。

问题:

  1. 滚动指示器(右上方)覆盖标题吗?我希望它停止在标题的底部,但事实并非如此。
  2. 如果我允许弹跳,而您拉得太远,则标题会拉下内容。那不行

我意识到:

我可以通过切换到UIView来解决当前的问题,但随后还会引入其他问题。

  1. 如果我使用UIView为行设置动画,则必须跟踪所有视图的位置,并确保在引入新视图时它们都以正确的距离移动。
  2. 1并不是很糟糕,但是考虑到屏幕旋转的问题,它变成了供虫子安家的好地方。

任何关于我的观点的建议都将受到欢迎!谢谢。

dan*_*ata 5

对于滚动指示器,可以使用:

 tableView.scrollIndicatorInsets = UIEdgeInsetsMake(yourHeaderHeight, 0, 0, 0);
Run Code Online (Sandbox Code Playgroud)

If you don't want the header to move when the table view bouncing is enabled you should replace the header with a UIView and the table view should start at the bottom of the UIView