Situation
The TableView
does everything I need it to because it
- Allows me to animate rows into it (not easily accomplished with a
UIView
)
- Allows for a non-scrolling header up top.
Problems
- The scroll indicator (top right) is covering the header. I expected it to stop at the bottom of the header but that's not the case apparently.
- If I allow bouncing and you pull down too far, the header pulls down with the content. That's not okay.
Realization
I can fix my current problems by switching to a UIView, but then other problems are introduced.
- If I animate rows in with a UIView, I have to keep track of all views positions and make sure they all move by the correct distance when a new view is introduced.
- 1 isn't so bad, but factor in the matter of screen rotation and it becomes a nice place for bugs to make a home.
Question
How can I resolve this?
For the scroll indicator you can use:
tableView.scrollIndicatorInsets = UIEdgeInsetsMake(yourHeaderHeight, 0, 0, 0);
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