Reputation: 187
Why its taking footer view?
-(CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section
{
if(section == 0)
return 16;
return 16.0;
}
-(CGFloat)tableView:(UITableView*)tableView heightForFooterInSection:(NSInteger)section
{
return 0.0;
}
-(UIView*)tableView:(UITableView*)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *view=[[UIView alloc] initWithFrame:CGRectZero];
view.backgroundColor=[UIColor redColor];
return view;
}
-(UIView*)tableView:(UITableView*)tableView viewForFooterInSection:(NSInteger)section
{
UIView *view=[[UIView alloc] initWithFrame:CGRectZero];
view.backgroundColor=[UIColor yellowColor];
return view;
}
Upvotes: 0
Views: 1356