// // KBCountHeaderView.m // YouHuiProject // // Created by 小花 on 2018/1/17. // Copyright © 2018年 kuxuan. All rights reserved. // #import "KBCountHeaderView.h" #import "KBCountDownView.h" @interface KBCountHeaderView () @property (nonatomic, strong) UIView *bgView; @end @implementation KBCountHeaderView - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self initSubViews]; } return self; } - (void)initSubViews { self.bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height)]; self.bgView.backgroundColor = [UIColor whiteColor]; UIImageView *logo = [[UIImageView alloc] initWithFrame:CGRectMake(-2, Fitsize(13), Fitsize(138), Fitsize(34))]; logo.image = [UIImage imageNamed:@"hot_web"]; [self.bgView addSubview:logo]; // [self.countDownView setEndTimer:@"0"]; self.countDownView = [KBCountDownView shareInstace]; self.countDownView.x = logo.width+20; self.countDownView.centerY = logo.centerY; [self.bgView addSubview:self.countDownView]; [self addSubview:self.bgView]; } - (void)setCountDownNumber:(NSString *)number { [self.countDownView setEndTimer:number]; } @end