2011-11-24 79 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。 –

相關問題