Cocoa touch UITableView分组:如何更改两个部分之间的偏移?
我有一个UITableView。我在第一部分和第二部分插入了UISegmentedButton。如何更改两个截面之间的偏移?我可以设置节的自定义高度。但我正在寻找更优雅的解决方案Cocoa touch UITableView分组:如何更改两个部分之间的偏移?,cocoa-touch,uitableview,Cocoa Touch,Uitableview,我有一个UITableView。我在第一部分和第二部分插入了UISegmentedButton。如何更改两个截面之间的偏移?我可以设置节的自定义高度。但我正在寻找更优雅的解决方案 我不确定您是如何插入分段按钮的,但我知道创建更多分隔的唯一方法是使用页脚高度委托方法我在FontType中使用了以下内容: #define kHeaderHeight 40.0f - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection
我不确定您是如何插入分段按钮的,但我知道创建更多分隔的唯一方法是使用页脚高度委托方法我在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];
}
尝试
tableView:heightForHeaderInSection:
或tableView:heightforfooterInstitution:
?定义优雅…自定义高度是一种方法。您可以自定义单元格以在其中插入任何内容,这正是他所做的。是的,我知道,但他没有指定插入方式。他也可以用自定义标题视图插入它们