2011-11-24 30 views
0

我有一个UITableView分组。我在第一部分和第二部分中插入了UISegmentedButton。如何更改两节之间的偏移量?我可以设置节的自定义高度,但我正在寻找更优雅的解决方案。UITableView分组:如何更改两节之间的偏移量?

enter image description here

+2

尝试'tableView:heightForHeaderInSection:'或'tableView:heightForFooterInSection:'? – Kjuly

+0

定义优雅...自定义高度是要走的路。 – aopsfan

回答

1

我用这个东西in FontType:

#define kHeaderHeight 40.0f 

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 
{ 
CGRect frame = CGRectMake(0, 0, tableView.frame.size.width, kHeaderHeight); 
return [[[UIView alloc] initWithFrame:frame] autorelease]; 
} 
0

我不知道你怎么插入的分割按钮,但我知道只有这样才能创造更多的分离是通过使用高度页脚委托方法

+0

您可以自定义单元格以在其中插入任何内容,而这正是他所做的。 –

+0

是的,我知道,但他没有指定他插入的方式。他本来可以插入自定义标题视图 – DanZimm

+0

yup .... mea culpa。 –

相关问题