底部试图

#import "searchHotHistoryHeader.h"
@interface searchHotHistoryHeader ()
@property (nonatomic,strong)UILabel *labtitle;

@end

@implementation searchHotHistoryHeader

+ (instancetype)TableViewFoot:(UITableView *)tableView{
    NSString *cellID = @"searchHotHistoryHeader";
    //注册collection 的header;
    [tableView registerClass:[searchHotHistoryHeader class] forHeaderFooterViewReuseIdentifier:cellID];
    searchHotHistoryHeader *foot = [tableView  dequeueReusableHeaderFooterViewWithIdentifier:cellID];
    if (foot == nil) {
        foot = [[searchHotHistoryHeader alloc] initWithReuseIdentifier:cellID];
    }
//    [foot creatUI];
    foot.contentView.backgroundColor = [UIColor whiteColor];
    return foot;
}
-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        [self creatUI];
    }
    return self;
}
- (void)creatUI{
    UILabel *lab = [[UILabel alloc] init];
    self.labtitle = lab;
    lab.text = @"热门搜索";
    lab.font = font(15);
    lab.textColor = [UIColor colorTextGray];
    [self.contentView addSubview:lab];
    [lab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.height.mas_equalTo(20);
        make.centerY.equalTo(self.contentView);
    }];
}
- (void)setTitle:(NSString *)title{
    _title = title;
    self.labtitle.text = title;
}




@end
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容