要自定义单元格,我们实现继承UITableViewCell的类。现在,要自定义分组UITableView中的Section header(与下面的图片相同),该怎么做?请指导我!
要自定义单元格,我们实现继承UITableViewCell的类。现在,要自定义分组UITableView中的Section header(与下面的图片相同),该怎么做?请指导我!
在您的表视图委托中实现tableView:viewForHeaderInSection:
方法。
iOS 5及以上版本中,您还需实现
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section