I have looked around for an answer and came up with this code. I am trying to insert a picture into the header view (where words normally would be).
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView* customView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 90.0)];
UIImageView *i=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"IMAGE NAME"]];
[customView addSubview:i];
return customView;
}
The table view header remains blank.
Any ideas? I’m just starting out here…Thanks!
Reference: Apple Developer UITableViewDelegate
The returned object can be a UILabel or UIImageView object, as well as a custom view. This method only works correctly when tableView:heightForHeaderInSection: is also implemented.
Try that.