How to Implement Custom Table View Section Headers and Footers with Storyboard?

The solution I came up with is basically the same solution used before the introduction of storyboards.

Up vote 0 down vote favorite share g+ share fb share tw.

Without using a storyboard we could simply drag a UIView onto the canvas, lay it out and then set it in the tableView:viewForHeaderInSection or tableView:viewForFooterInSection delegate methods. How do we accomplish this with a StoryBoard where we cannot drag a UIView onto the canvas uitableview ios5 uistoryboard link|improve this question asked Feb 9 at 21:41Seamus715.

The solution I came up with is basically the same solution used before the introduction of storyboards. Create a new, empty interface class file. Drag a UIView on to the canvas, layout as desired.

Load the nib manually, assign to the appropriate header/footer section in viewForHeaderInSection or viewForFooterInSection delegate methods. I had hope that Apple simplified this scenario with storyboards and kept looking for a better or simpler solution. For example custom table headers and footers are straight forward to add.

I used to do the following to create header/footer views lazily: Add a freeform view controller for the section header/footer to the storyboard Handle all stuff for the header in the view controller In the table view controller provide a mutable array of view controllers for the section headers/footers repopulated with NSNull null In viewForHeaderInSection/viewForFooterInSection if view controller does not yet exist, create it with storyboards instantiateViewControllerWithIdentifier, remember it in the array and return the view controllers view.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions