@implementation YYheaderView
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
//创建与头视图大小一样的底部view
UIView *headView = [[UIView alloc] init];
headView.backgroundColor = [UIColor whiteColor];
headView.frame = CGRectMake(0, 0, SCREEN_W, 44);
[self.contentView addSubview:headView];
//创建带指示图片的button
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"brand_expand"] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(tipExpandBtn:) forControlEvents:UIControlEventTouchUpInside];
btn.frame = CGRectMake(20, 14, 30, 16);
self.btn = btn;
[self.contentView addSubview:btn];
//创建显示组信息的label
UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(80, 7, 160, 30)];
titleLabel.textColor = [UIColor blackColor];
self.titleLabel = titleLabel;
[self.contentView addSubview:titleLabel];
}