Im creating a music based app. The playlist screen is a UITableView. It has 3 sections: Previous Tracks, Now Playing, Next Tracks. They are in order as follows:
-- PREVIOUS TRACKS SECTION --
Track Z
Track Y
Track X
-- NOW PLAYING SECTION --
Track A
-- NEXT TRACKS --
Track B
Track C
Track D
I always want the 'Now Playing' section to be scrolled to the top of the table view. This is not a problem if: A) There are no items in the Previous tracks section or B) There are enough tracks in the Next Tracks section to pass beyond the bottom of the UITableView.
However, if there are, for example 10 tracks in the Previous Tracks section, one in the Currently Playing and 2 in the Next Track section, then when I tell the table view to scroll so the Now Playing section is at the top of the view, it just springs back so it is 3 items from the bottom of the view (the 2 'Next Track' items plus the Currently Playing).
To put it another way, look at your iPod library or any TableView on the iPhone. What im trying to acheive is to scroll the last track in the list to the top of the screen and leave blank white space underneath.
Is there any way of telling the TableView not to spring back into place in this scenario? I have tried playing a large height cell there, but its hacky and causes problems when re-arranging cells in the TableView.
Technically this is Monotouch, but im fine with Objective C, so whatever language is fine.