正确写法
#import "TemperatureHeader.h"
@implementation TemperatureHeader
- ( instancetype )initWithReuseIdentifier:( NSString *)reuseIdentifier{
self = [ super initWithReuseIdentifier :reuseIdentifier];
if ( self ) {
}
return self ;
}
@end
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
TemperatureHeader *sectionHeadView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:TemperatureHeaderID];
if (!sectionHeadView) {
sectionHeadView = [[TemperatureHeader alloc]initWithReuseIdentifier:TemperatureHeaderID];
}
return sectionHeadView;
}