Bryan ORTIZ
Bryan ORTIZ

Reputation: 316

Make a cell (but not the first one) always visible on UITableView

I had a UIScrollView with a UIImage above a UISegmentedControl above my UITableView. I was disabling the scrolling of the TableView until the Image disappeared so I could finally enable the scrolling but sadly there was a delay on it, meaning I had to remove my finger from the screen in order to refresh the scrolling property, which I didnt like so I started again.

Now I'm getting my tableView with his customs cells. The thing is I want the cell with the segmentedControl to stay on top of my tableView. To make it easier to understand, if I scroll on cells 10, 11 and 12, I should see: cell 1 (the one with the segmentedControlon it) , 10, 11, 12 but if I scroll to the top, I should get cell 0, 1, 2, 3.

I can't seem to find any solution but the Twitter IOS Application does seem to manage it, any solutions for my problem ?

Upvotes: 0

Views: 350

Answers (1)

Wyatt
Wyatt

Reputation: 309

You could try splitting your tableView into two sections, where cell 0 is in the first section, cell 1 is the header for the second section, and cells 2...n are in the second section. This would probably give you the behavior you want ('cell 1' always visible) without having to fight the normal UI behavior.

Upvotes: 1

Related Questions