Table header image view

Here is a code snippet to set an image view as Table header view.

1UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image-name.png"]];
2    imgView.contentMode = UIViewContentModeScaleAspectFit;
3    self.tableView.tableHeaderView = imgView;

Note: Not to confuse it with section header view, which uses the following delegates to define.

1- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;
overlaied image when clicked on thumbnail

Makzan | Ios dev scrapbook | Table of Content