【发布时间】:2012-04-06 20:38:43
【问题描述】:
为什么 heightForHeaderInSection 和 heightForFooterInSection 在 iOS 4.3 中不起作用而在 5.0 中起作用?
-(CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section
{
if (section == 0) {
return 10.0;
}
return (tableView.sectionHeaderHeight - 20);
}
-(CGFloat)tableView:(UITableView*)tableView heightForFooterInSection:(NSInteger)section
{
if (section == ([self.optionsArray count] - 1)) {
return 15.0;
}
return (tableView.sectionFooterHeight - 20);
}
【问题讨论】:
标签: iphone cocoa-touch ipad uitableview objective-c-2.0