|
|
@@ -7,61 +7,20 @@
|
|
|
//
|
|
|
|
|
|
#import "HMVideoControlView.h"
|
|
|
-#import "HMVideoSliderView.h"
|
|
|
#import "PersonCenterModel.h"
|
|
|
#import "CommentModel.h"
|
|
|
#import "BogoShopKit.h"
|
|
|
|
|
|
-// 判断是否是iPhone X系列
|
|
|
-#define IS_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ?\
|
|
|
-(\
|
|
|
-CGSizeEqualToSize(CGSizeMake(375, 812),[UIScreen mainScreen].bounds.size)\
|
|
|
-||\
|
|
|
-CGSizeEqualToSize(CGSizeMake(812, 375),[UIScreen mainScreen].bounds.size)\
|
|
|
-||\
|
|
|
-CGSizeEqualToSize(CGSizeMake(414, 896),[UIScreen mainScreen].bounds.size)\
|
|
|
-||\
|
|
|
-CGSizeEqualToSize(CGSizeMake(896, 414),[UIScreen mainScreen].bounds.size))\
|
|
|
-:\
|
|
|
-NO)
|
|
|
-#define ADAPTATIONRATIO kScreenW / 750.0f
|
|
|
-#define TABBAR_HEIGHT (IS_iPhoneX ? 83.0f : 49.0f)
|
|
|
-
|
|
|
-@implementation HMVideoItemButton
|
|
|
-
|
|
|
-- (void)layoutSubviews {
|
|
|
- [super layoutSubviews];
|
|
|
-
|
|
|
- [self.imageView sizeToFit];
|
|
|
- [self.titleLabel sizeToFit];
|
|
|
-
|
|
|
- CGFloat width = self.frame.size.width;
|
|
|
- CGFloat height = self.frame.size.height;
|
|
|
-
|
|
|
- CGFloat imgW = self.imageView.frame.size.width;
|
|
|
- CGFloat imgH = self.imageView.frame.size.height;
|
|
|
-
|
|
|
- self.imageView.frame = CGRectMake((width - imgH) / 2, 0, imgW, imgH);
|
|
|
-
|
|
|
- CGFloat titleW = self.titleLabel.frame.size.width;
|
|
|
- CGFloat titleH = self.titleLabel.frame.size.height;
|
|
|
-
|
|
|
- self.titleLabel.frame = CGRectMake((width - titleW) / 2, height - titleH + 5, titleW, titleH);
|
|
|
-}
|
|
|
-
|
|
|
-@end
|
|
|
-
|
|
|
@interface HMVideoControlView ()
|
|
|
|
|
|
@property (nonatomic, strong) UIImageView *iconView;
|
|
|
-@property (nonatomic, strong) HMVideoItemButton *praiseBtn;
|
|
|
-@property (nonatomic, strong) HMVideoItemButton *shareBtn;
|
|
|
-@property (nonatomic, strong) HMVideoItemButton *oneOnOneBtn;
|
|
|
-@property (nonatomic, strong) HMVideoItemButton *giftBtn;
|
|
|
+@property (nonatomic, strong) QMUIButton *praiseBtn;
|
|
|
+@property (nonatomic, strong) QMUIButton *shareBtn;
|
|
|
+@property (nonatomic, strong) QMUIButton *oneOnOneBtn;
|
|
|
+//@property (nonatomic, strong) QMUIButton *giftBtn;
|
|
|
|
|
|
@property (nonatomic, strong) UILabel *nameLabel;
|
|
|
@property (nonatomic, strong) UILabel *contentLabel;
|
|
|
-@property (nonatomic, strong) HMVideoSliderView *sliderView;
|
|
|
|
|
|
@property (nonatomic, strong) UIActivityIndicatorView *loadingView;
|
|
|
@property (nonatomic, strong) UIButton *playBtn;
|
|
|
@@ -75,6 +34,9 @@ NO)
|
|
|
|
|
|
@property(nonatomic, strong) BogoVideoGoodControl *goodControl;
|
|
|
|
|
|
+@property (nonatomic, strong) UIStackView *stackView;
|
|
|
+@property (nonatomic, strong) UIView *avatarView;
|
|
|
+
|
|
|
@end
|
|
|
|
|
|
@implementation HMVideoControlView
|
|
|
@@ -83,31 +45,12 @@ NO)
|
|
|
if (self = [super init]) {
|
|
|
self.isPushed = isPushed;
|
|
|
[self addSubview:self.coverImgView];
|
|
|
- [self addSubview:self.iconView];
|
|
|
- [self addSubview:self.praiseBtn];
|
|
|
- [self addSubview:self.commentBtn];
|
|
|
- [self addSubview:self.shareBtn];
|
|
|
- [self addSubview:self.oneOnOneBtn];
|
|
|
- if (![GlobalVariables sharedInstance].userModel.is_open_young.integerValue) {
|
|
|
- [self addSubview:self.giftBtn];
|
|
|
- }
|
|
|
+ [self addSubview:self.stackView];
|
|
|
[self addSubview:self.nameLabel];
|
|
|
[self addSubview:self.contentLabel];
|
|
|
- [self addSubview:self.sliderView];
|
|
|
|
|
|
[self addSubview:self.loadingView];
|
|
|
[self addSubview:self.playBtn];
|
|
|
- [self addSubview:self.commentButton];
|
|
|
-
|
|
|
-
|
|
|
- [self addSubview:self.moreBtn];
|
|
|
-
|
|
|
- [self.moreBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.right.mas_equalTo(-20);
|
|
|
- make.top.mas_equalTo(kStatusBarHeight);
|
|
|
- make.width.mas_equalTo(40);
|
|
|
- make.height.mas_equalTo(kRealValue(30));
|
|
|
- }];
|
|
|
|
|
|
[self.coverImgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.edges.equalTo(self);
|
|
|
@@ -121,69 +64,18 @@ NO)
|
|
|
if (self.isPushed){
|
|
|
bottomM = TABBAR_HEIGHT;
|
|
|
}
|
|
|
- [self.sliderView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.right.equalTo(self);
|
|
|
- make.bottom.equalTo(self).offset(-bottomM);
|
|
|
- make.height.mas_equalTo(ADAPTATIONRATIO * 1.0f);
|
|
|
- }];
|
|
|
|
|
|
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.equalTo(self).offset(ADAPTATIONRATIO * 30.0f);
|
|
|
- make.bottom.equalTo(self.sliderView).offset(-ADAPTATIONRATIO * 30.0f);
|
|
|
- make.width.mas_equalTo(ADAPTATIONRATIO * 504.0f);
|
|
|
+ make.left.equalTo(self).offset(kRealValue(12));
|
|
|
+ make.bottom.mas_offset(kRealValue(-18));
|
|
|
+ make.width.mas_lessThanOrEqualTo(kRealValue(275));
|
|
|
}];
|
|
|
|
|
|
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.equalTo(self.contentLabel);
|
|
|
- make.bottom.equalTo(self.contentLabel.mas_top).offset(-ADAPTATIONRATIO * 20.0f);
|
|
|
+ make.bottom.equalTo(self.contentLabel.mas_top).offset(-8);
|
|
|
}];
|
|
|
|
|
|
- [self.oneOnOneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.right.equalTo(self).offset(-ADAPTATIONRATIO * 15.0f);
|
|
|
- make.bottom.equalTo(self.contentLabel.mas_bottom).offset(-ADAPTATIONRATIO * 10.0f);
|
|
|
- make.height.mas_equalTo(ADAPTATIONRATIO * 110.0f);
|
|
|
- }];
|
|
|
-
|
|
|
- if (![GlobalVariables sharedInstance].userModel.is_open_young.integerValue) {
|
|
|
- [self.giftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.right.equalTo(self).offset(-ADAPTATIONRATIO * 25.0f);
|
|
|
- make.bottom.equalTo(self.nameLabel.mas_top).offset(-ADAPTATIONRATIO * 50.0f);
|
|
|
- // make.centerX.mas_equalTo()
|
|
|
- make.height.mas_equalTo(ADAPTATIONRATIO * 55.0f);
|
|
|
- }];
|
|
|
-
|
|
|
- [self.shareBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- // make.right.equalTo(self).offset(-ADAPTATIONRATIO * 30.0f);
|
|
|
- make.centerX.mas_equalTo(self.giftBtn.mas_centerX);
|
|
|
- make.bottom.equalTo(self.giftBtn.mas_top).offset(-ADAPTATIONRATIO * 40.0f);
|
|
|
- make.height.mas_equalTo(ADAPTATIONRATIO * 110.0f);
|
|
|
- }];
|
|
|
- }else{
|
|
|
- [self.shareBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- // make.right.equalTo(self).offset(-ADAPTATIONRATIO * 30.0f);
|
|
|
- make.right.equalTo(self).offset(-ADAPTATIONRATIO * 25.0f);
|
|
|
- make.bottom.equalTo(self.nameLabel.mas_top).offset(-ADAPTATIONRATIO * 90.0f);
|
|
|
- make.height.mas_equalTo(ADAPTATIONRATIO * 110.0f);
|
|
|
- }];
|
|
|
- }
|
|
|
-
|
|
|
- [self.commentBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.centerX.equalTo(self.shareBtn);
|
|
|
- make.bottom.equalTo(self.shareBtn.mas_top).offset(-ADAPTATIONRATIO * 45.0f);
|
|
|
- make.height.mas_equalTo(ADAPTATIONRATIO * 110.0f);
|
|
|
- }];
|
|
|
-
|
|
|
- [self.praiseBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.centerX.equalTo(self.shareBtn);
|
|
|
- make.bottom.equalTo(self.commentBtn.mas_top).offset(-ADAPTATIONRATIO * 45.0f);
|
|
|
- make.height.mas_equalTo(ADAPTATIONRATIO * 110.0f);
|
|
|
- }];
|
|
|
-
|
|
|
- [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.centerX.equalTo(self.shareBtn);
|
|
|
- make.bottom.equalTo(self.praiseBtn.mas_top).offset(-ADAPTATIONRATIO * 70.0f);
|
|
|
- make.width.height.mas_equalTo(ADAPTATIONRATIO * 100.0f);
|
|
|
- }];
|
|
|
|
|
|
[self.loadingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.center.equalTo(self);
|
|
|
@@ -193,17 +85,11 @@ NO)
|
|
|
make.center.equalTo(self);
|
|
|
}];
|
|
|
|
|
|
- [self.commentButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.equalTo(self).offset(10);
|
|
|
- make.top.equalTo(self.sliderView.mas_bottom).offset(10);
|
|
|
- make.right.equalTo(self);
|
|
|
- }];
|
|
|
-
|
|
|
- [self addSubview:self.focusBtn];
|
|
|
- [self.focusBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.centerX.equalTo(self.iconView);
|
|
|
- make.centerY.equalTo(self.iconView.mas_bottom);
|
|
|
+ [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.bottom.mas_equalTo(self.contentLabel);
|
|
|
+ make.right.mas_offset(kRealValue(-12));
|
|
|
}];
|
|
|
+
|
|
|
|
|
|
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(controlViewDidClick:)];
|
|
|
[self addGestureRecognizer:tap];
|
|
|
@@ -219,12 +105,11 @@ NO)
|
|
|
_model = model;
|
|
|
|
|
|
if ([model.user_id isEqualToString:[[IMAPlatform sharedInstance].host imUserId]]) {
|
|
|
- self.giftBtn.hidden = YES;
|
|
|
+// self.giftBtn.hidden = YES;
|
|
|
}else{
|
|
|
- self.giftBtn.hidden = NO;
|
|
|
+// self.giftBtn.hidden = NO;
|
|
|
}
|
|
|
|
|
|
- self.sliderView.value = 0;
|
|
|
//
|
|
|
[self.coverImgView sd_setImageWithURL:[NSURL URLWithString:model.photo_image] placeholderImage:[UIImage imageNamed:@"placeholderimg"]];
|
|
|
//
|
|
|
@@ -239,9 +124,7 @@ NO)
|
|
|
|
|
|
if (![self.model.user_id isEqualToString:[BGIMLoginManager sharedInstance].loginParam.identifier]){
|
|
|
[self.focusBtn setHidden:[model.has_focus isEqualToString:@"1"]];
|
|
|
- self.moreBtn.hidden = YES;
|
|
|
}else{
|
|
|
- self.moreBtn.hidden = NO;
|
|
|
self.focusBtn.hidden = NO;
|
|
|
}
|
|
|
[self loadNetDataWithPage:1];
|
|
|
@@ -411,7 +294,7 @@ NO)
|
|
|
|
|
|
#pragma mark - Public Methods
|
|
|
- (void)setProgress:(float)progress {
|
|
|
- self.sliderView.value = progress;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- (void)startLoading {
|
|
|
@@ -529,6 +412,48 @@ NO)
|
|
|
}
|
|
|
|
|
|
#pragma mark - 懒加载
|
|
|
+
|
|
|
+- (UIStackView *)stackView {
|
|
|
+ if (!_stackView) {
|
|
|
+
|
|
|
+ NSMutableArray *buttons = [[NSMutableArray alloc] initWithArray:@[
|
|
|
+ self.avatarView, self.praiseBtn, self.commentBtn, self.shareBtn, self.oneOnOneBtn
|
|
|
+ ]];
|
|
|
+
|
|
|
+ _stackView = [[UIStackView alloc] initWithArrangedSubviews:buttons];
|
|
|
+ _stackView.axis = UILayoutConstraintAxisVertical;
|
|
|
+ _stackView.distribution = UIStackViewDistributionEqualSpacing;
|
|
|
+ _stackView.alignment = UIStackViewAlignmentCenter;
|
|
|
+ _stackView.spacing = 10;
|
|
|
+ }
|
|
|
+ return _stackView;
|
|
|
+}
|
|
|
+
|
|
|
+- (UIView *)avatarView {
|
|
|
+ if (!_avatarView) {
|
|
|
+ _avatarView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kRealValue(48), kRealValue(58))];
|
|
|
+ [_avatarView addSubview:self.iconView];
|
|
|
+ [_avatarView addSubview:self.focusBtn];
|
|
|
+ [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.size.mas_equalTo(self.iconView.size);
|
|
|
+ make.top.centerX.mas_offset(0);
|
|
|
+ }];
|
|
|
+
|
|
|
+ [self.focusBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.centerX.mas_offset(0);
|
|
|
+ make.centerY.equalTo(self.iconView.mas_bottom);
|
|
|
+ make.size.mas_equalTo(kRealValue(20));
|
|
|
+ }];
|
|
|
+
|
|
|
+ [_avatarView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.size.mas_equalTo(self.avatarView.size);
|
|
|
+ }];
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return _avatarView;
|
|
|
+}
|
|
|
+
|
|
|
- (UIImageView *)coverImgView {
|
|
|
if (!_coverImgView) {
|
|
|
_coverImgView = [UIImageView new];
|
|
|
@@ -540,8 +465,8 @@ NO)
|
|
|
|
|
|
- (UIImageView *)iconView {
|
|
|
if (!_iconView) {
|
|
|
- _iconView = [UIImageView new];
|
|
|
- _iconView.layer.cornerRadius = ADAPTATIONRATIO * 50.0f;
|
|
|
+ _iconView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kRealValue(48), kRealValue(48))];
|
|
|
+ _iconView.layer.cornerRadius = _iconView.height/2;
|
|
|
_iconView.layer.masksToBounds = YES;
|
|
|
_iconView.layer.borderColor = [UIColor whiteColor].CGColor;
|
|
|
_iconView.layer.borderWidth = 1.0f;
|
|
|
@@ -553,61 +478,66 @@ NO)
|
|
|
return _iconView;
|
|
|
}
|
|
|
|
|
|
-- (HMVideoItemButton *)praiseBtn {
|
|
|
+- (QMUIButton *)praiseBtn {
|
|
|
if (!_praiseBtn) {
|
|
|
- _praiseBtn = [HMVideoItemButton new];
|
|
|
- [_praiseBtn setImage:[UIImage imageNamed:@"me_icon_star_normal"] forState:UIControlStateNormal];
|
|
|
- [_praiseBtn setImage:[UIImage imageNamed:@"me_icon_star_selected"] forState:UIControlStateSelected];
|
|
|
- _praiseBtn.titleLabel.font = [UIFont systemFontOfSize:13.0f];
|
|
|
+ _praiseBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
|
|
|
+ [_praiseBtn setImage:[UIImage imageNamed:@"icon22x22-2"] forState:UIControlStateNormal];
|
|
|
+ [_praiseBtn setImage:[UIImage imageNamed:@"icon22x22-2"] forState:UIControlStateSelected];
|
|
|
+ [_praiseBtn setTitle:@"0" forState:UIControlStateNormal];
|
|
|
+ _praiseBtn.imagePosition = QMUIButtonImagePositionTop;
|
|
|
+ _praiseBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
|
|
[_praiseBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
|
|
[_praiseBtn addTarget:self action:@selector(praiseBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
}
|
|
|
return _praiseBtn;
|
|
|
}
|
|
|
|
|
|
-- (HMVideoItemButton *)commentBtn {
|
|
|
+- (QMUIButton *)commentBtn {
|
|
|
if (!_commentBtn) {
|
|
|
- _commentBtn = [HMVideoItemButton new];
|
|
|
- [_commentBtn setImage:[UIImage imageNamed:@"me_icon_comment"] forState:UIControlStateNormal];
|
|
|
- _commentBtn.titleLabel.font = [UIFont systemFontOfSize:13.0f];
|
|
|
+ _commentBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
|
|
|
+ [_commentBtn setImage:[UIImage imageNamed:@"icon22x22"] forState:UIControlStateNormal];
|
|
|
+ [_commentBtn setTitle:@"0" forState:UIControlStateNormal];
|
|
|
+ _commentBtn.imagePosition = QMUIButtonImagePositionTop;
|
|
|
+ _commentBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
|
|
[_commentBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
|
|
[_commentBtn addTarget:self action:@selector(commentBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
}
|
|
|
return _commentBtn;
|
|
|
}
|
|
|
|
|
|
-- (HMVideoItemButton *)shareBtn {
|
|
|
+- (QMUIButton *)shareBtn {
|
|
|
if (!_shareBtn) {
|
|
|
- _shareBtn = [HMVideoItemButton new];
|
|
|
- [_shareBtn setImage:[UIImage imageNamed:@"me_icon_share"] forState:UIControlStateNormal];
|
|
|
- _shareBtn.titleLabel.font = [UIFont systemFontOfSize:13.0f];
|
|
|
+ _shareBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
|
|
|
+ [_shareBtn setImage:[UIImage imageNamed:@"icon22x22-3"] forState:UIControlStateNormal];
|
|
|
+ [_shareBtn setTitle:@"0" forState:UIControlStateNormal];
|
|
|
+ _shareBtn.imagePosition = QMUIButtonImagePositionTop;
|
|
|
+ _shareBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
|
|
[_shareBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
|
|
[_shareBtn addTarget:self action:@selector(shareBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
+
|
|
|
}
|
|
|
return _shareBtn;
|
|
|
}
|
|
|
|
|
|
--(HMVideoItemButton *)giftBtn{
|
|
|
- if (!_giftBtn) {
|
|
|
- _giftBtn = [HMVideoItemButton new];
|
|
|
- [_giftBtn setImage:[UIImage imageNamed:@"mg_video_gift"] forState:UIControlStateNormal];
|
|
|
- _giftBtn.titleLabel.font = [UIFont systemFontOfSize:13.0f];
|
|
|
- [_giftBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
|
|
- [_giftBtn addTarget:self action:@selector(giftBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- if (kIsCheckingVersion())
|
|
|
- {
|
|
|
- _giftBtn.hidden = YES;
|
|
|
- }
|
|
|
- }
|
|
|
- return _giftBtn;
|
|
|
-}
|
|
|
+//-(HMVideoItemButton *)giftBtn{
|
|
|
+// if (!_giftBtn) {
|
|
|
+// _giftBtn = [HMVideoItemButton new];
|
|
|
+// [_giftBtn setImage:[UIImage imageNamed:@"mg_video_gift"] forState:UIControlStateNormal];
|
|
|
+// _giftBtn.titleLabel.font = [UIFont systemFontOfSize:13.0f];
|
|
|
+// [_giftBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
|
|
+// [_giftBtn addTarget:self action:@selector(giftBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
+// if (kIsCheckingVersion())
|
|
|
+// {
|
|
|
+// _giftBtn.hidden = YES;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// return _giftBtn;
|
|
|
+//}
|
|
|
|
|
|
-- (HMVideoItemButton *)oneOnOneBtn {
|
|
|
+- (QMUIButton *)oneOnOneBtn {
|
|
|
if (!_oneOnOneBtn) {
|
|
|
- _oneOnOneBtn = [HMVideoItemButton new];
|
|
|
- [_oneOnOneBtn setImage:[UIImage imageNamed:@"me_icon_im_video"] forState:UIControlStateNormal];
|
|
|
- _oneOnOneBtn.titleLabel.font = [UIFont systemFontOfSize:13.0f];
|
|
|
- [_oneOnOneBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
|
|
+ _oneOnOneBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
|
|
|
+ [_oneOnOneBtn setImage:[UIImage imageNamed:@"容器 2590"] forState:UIControlStateNormal];
|
|
|
[_oneOnOneBtn addTarget:self action:@selector(oneOnOneBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
}
|
|
|
return _oneOnOneBtn;
|
|
|
@@ -636,17 +566,6 @@ NO)
|
|
|
return _contentLabel;
|
|
|
}
|
|
|
|
|
|
-- (HMVideoSliderView *)sliderView {
|
|
|
- if (!_sliderView) {
|
|
|
- _sliderView = [HMVideoSliderView new];
|
|
|
- _sliderView.isHideSliderBlock = YES;
|
|
|
- _sliderView.sliderHeight = ADAPTATIONRATIO * 1.0f;
|
|
|
- _sliderView.maximumTrackTintColor = [UIColor grayColor];
|
|
|
- _sliderView.minimumTrackTintColor = [UIColor whiteColor];
|
|
|
- }
|
|
|
- return _sliderView;
|
|
|
-}
|
|
|
-
|
|
|
- (UIActivityIndicatorView *)loadingView {
|
|
|
if (!_loadingView) {
|
|
|
_loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
|
|
|
@@ -665,31 +584,6 @@ NO)
|
|
|
return _playBtn;
|
|
|
}
|
|
|
|
|
|
-- (UIButton *)commentButton{
|
|
|
- if (!_commentButton) {
|
|
|
- _commentButton = [[UIButton alloc]initWithFrame:CGRectZero];
|
|
|
- [_commentButton setBackgroundColor:kClearColor];
|
|
|
- [_commentButton setTitle:ASLocalizedString(@"想撩TA,先评论")forState:UIControlStateNormal];
|
|
|
- [_commentButton.titleLabel setFont:[UIFont systemFontOfSize:15]];
|
|
|
- _commentButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
|
|
|
- [_commentButton.titleLabel setTextColor:[kWhiteColor colorWithAlphaComponent:0.5]];
|
|
|
- _commentButton.hidden = YES;
|
|
|
- [_commentButton addTarget:self action:@selector(commentBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- }
|
|
|
- return _commentButton;
|
|
|
-}
|
|
|
-
|
|
|
--(UIButton *)moreBtn{
|
|
|
- if (!_moreBtn) {
|
|
|
- _moreBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
|
|
- _moreBtn.frame = CGRectMake(kScreenW - kRealValue(10) - 64, kStatusBarHeight, kRealValue(44), kRealValue(44));
|
|
|
- [_moreBtn setImage:[UIImage imageNamed:@"video_more_Btn"] forState:UIControlStateNormal];
|
|
|
- [_moreBtn addTarget:self action:@selector(clickMoreBtn:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- _moreBtn.hidden = YES;
|
|
|
- }
|
|
|
- return _moreBtn;
|
|
|
-}
|
|
|
-
|
|
|
|
|
|
-(void)clickMoreBtn:(UIButton *)sender{
|
|
|
if ([self.delegate respondsToSelector:@selector(controlViewDidClickMoreBtn:)]) {
|
|
|
@@ -700,7 +594,7 @@ NO)
|
|
|
- (UIButton *)focusBtn{
|
|
|
if (!_focusBtn) {
|
|
|
_focusBtn = [[UIButton alloc]initWithFrame:CGRectZero];
|
|
|
- [_focusBtn setImage:[UIImage imageNamed:@"me_icon_focus"] forState:UIControlStateNormal];
|
|
|
+ [_focusBtn setImage:[UIImage imageNamed:@"容器 2584"] forState:UIControlStateNormal];
|
|
|
[_focusBtn addTarget:self action:@selector(focusBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
|
|
}
|
|
|
return _focusBtn;
|