-1
私は最初のフッタと2番目のセルヘッダをマージする必要があるtableViewを作成しようとしています。私は両方を取り除こうとしましたが、間に区切り線が残っています。フッタとヘッダの間のセパレータラインを削除するIOS
最初のセルのフッターと2番目のセルのヘッダーの間にセパレータを削除する方法はありますか?私は
- (UIView*) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIView* footerView = nil;
switch (section) {
case 0:
footerView = [[UIView alloc] initWithFrame: CGRectMake(0, 0, tableView.bounds.size.width, 0.01f)];
// footerView.backgroundColor = [UIColor greenColor];
break;
case 1:
{
footerView = [[UIView alloc] initWithFrame: CGRectMake(0, 0, tableView.bounds.size.width, 30)];
}
break;
case 2:
{
footerView = [[UIView alloc] initWithFrame: CGRectMake(0, 0, tableView.bounds.size.width, 30)];
}
break;
default:
break;
}
return footerView;
}
でフッターとヘッダー に高さを与えることを試みる。しかし、まだ、ヘッダーとフッターの両方の高された
もう一つは同じまま 私はなぜ知っていることができませんか?
にあなたはフッターの高さを返すために、テーブルビューのデリゲートメソッドの下に実装する必要があります - (CGFloat)のtableView:(のUITableView *)のtableView heightForFooterInSection:(NSInteger)セクション { CGFloat footerHieght = 30.0; (セクション== 0) { footerHieght = 1.0; } return footerHieght; } –