Commit bf1af60728d9297a6566c8acc4ff2c027aa67ba4

Authored by 王军波
1 parent c73d6d38

直播列表状态表示,播放标题

LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCLivePlayerCell.m
@@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
41 [self.contentView addSubview:self.countLabel]; 41 [self.contentView addSubview:self.countLabel];
42 [self.contentView addSubview:self.lookLabel]; 42 [self.contentView addSubview:self.lookLabel];
43 [self.contentView addSubview:self.imageView]; 43 [self.contentView addSubview:self.imageView];
  44 + [self.contentView addSubview:self.titleLabel];
44 } 45 }
45 return self; 46 return self;
46 } 47 }
@@ -115,20 +116,31 @@ @@ -115,20 +116,31 @@
115 _imageView.frame = CGRectMake(0, 70, SCREEN_WIDTH, SCREEN_WIDTH); 116 _imageView.frame = CGRectMake(0, 70, SCREEN_WIDTH, SCREEN_WIDTH);
116 _imageView.contentMode = UIViewContentModeScaleAspectFill; 117 _imageView.contentMode = UIViewContentModeScaleAspectFill;
117 _imageView.clipsToBounds = YES; 118 _imageView.clipsToBounds = YES;
  119 + [_imageView addSubview:self.stateLabel];
118 } 120 }
119 return _imageView; 121 return _imageView;
120 } 122 }
121 123
122 - (UILabel *)stateLabel { 124 - (UILabel *)stateLabel {
123 if (!_stateLabel) { 125 if (!_stateLabel) {
124 - 126 + _stateLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 70, 10, 60, 20)];
  127 + _stateLabel.font = [UIFont systemFontOfSize:13];
  128 + _stateLabel.textAlignment = NSTextAlignmentCenter;
  129 + _stateLabel.textColor = [UIColor whiteColor];
  130 + _stateLabel.layer.cornerRadius = 10;
  131 + _stateLabel.layer.masksToBounds = YES;
  132 + _stateLabel.text = @"直播";
  133 + _stateLabel.layer.borderColor = [UIColor whiteColor].CGColor;
  134 + _stateLabel.layer.borderWidth = 1;
125 } 135 }
126 return _stateLabel; 136 return _stateLabel;
127 } 137 }
128 138
129 - (UILabel *)titleLabel { 139 - (UILabel *)titleLabel {
130 if (!_titleLabel) { 140 if (!_titleLabel) {
131 - 141 + _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, SCREEN_WIDTH + 75, SCREEN_WIDTH, 20)];
  142 + _titleLabel.textColor = [UIColor grayColor];
  143 + _titleLabel.text = @"这是一个标题";
132 } 144 }
133 return _titleLabel; 145 return _titleLabel;
134 } 146 }