I have an iPhone development question:
How can I put an image above a grouped UITableView that scrolls along with the table view? (The image should be attached to the top of the table view, so when scrolling the table view, the image should scroll out of the screen along with the table view. The image is NOT a fixed position subview as in similar postings)
I tried setting backgroundColor with colorWithPatternImage and adding EdgeInsets to push the table view down, but then the image displays non-scrolling behind the table view, AND the image displays also behind each and every section in the table view (scrolling).
The only solution I have come up with is to let cellForRowAtIndexPath return an image for the first section in the table view, though this feels like a hack.
Is there a proper way to do this?
The simplest way to put an image at the top of a table view would be to set the table view’s
tableHeaderViewproperty with an instance ofUIImageViewcontaining the image.