12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //
- // LDCountHeaderView.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/1/17.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "LDCountHeaderView.h"
- #import "LDCountDownView.h"
- @interface LDCountHeaderView ()
- @property (nonatomic, strong) UIView *bgView;
- @end
- @implementation LDCountHeaderView
- - (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 = [LDCountDownView 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
|