I want to create a ‘hidden custom cell’ effect like that used in the popular ‘pull to refresh’ pattern (http://stackoverflow.com/questions/9076905/uitableview-hide-first-cell). I’m not creating a pull to refresh interface but I want a special cell at the top.
I can work out how to do this using the many pull-to-refresh examples but they all create the hidden view in code. I would like to create this in interface builder.
How can I do this? I would like to use storyboard if at all possible.
the concept is very simple. The idea is to set a negative edge inset for your tableview. SO assume your first cell is 44 px in height:
the following code will cause the table to start showing the content 44 pixels down, which will create that hidden cell effect.
You can achieve the same thing with interface builder. It is in the size inspector under ‘Scroll View Size’. You will have to set the Content Inset for the ‘Top’ attribute to a negative number.
hope this helps