123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //
- // YOUPAILZLiveVideoView.m
- // TIANYAN
- //
- // Created by CY on 2021/5/31.
- // Copyright © 2021 leo. All rights reserved.
- //
- #import "YOUPAILZLiveVideoView.h"
- @interface YOUPAILZLiveVideoView ()
- @property (nonatomic,weak) UIView *youpaipofflineBgV;
- @property (nonatomic,weak) UILabel *youpaipofflineTitleL;
- @property (nonatomic,weak) UILabel *youpaipofflineSubTitleL;
- @end
- @implementation YOUPAILZLiveVideoView
- - (instancetype)initWithFrame:(CGRect)frame{
- if (self = [super initWithFrame:frame]) {
- [self youpaifinitUI];
- }
- return self;
- }
- - (void)youpaifinitUI{
- UIView *videoView= [[UIView alloc] init];
- [self addSubview:videoView];
- self.youpaipvideoView = videoView;
- [videoView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.top.bottom.right.offset(0.0f);
- }];
-
- UIView *youpaipofflineBgV = [[UIView alloc] init];
- youpaipofflineBgV.hidden = YES;
- youpaipofflineBgV.backgroundColor = HexColorFromRGB(0x2A2935);
- [self addSubview:youpaipofflineBgV];
- self.youpaipofflineBgV = youpaipofflineBgV;
- [youpaipofflineBgV mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.top.bottom.right.offset(0.0f);
- }];
-
- UILabel *youpaipofflineTitleL = [[UILabel alloc] init];
- youpaipofflineTitleL.text = @"女神暂时离开";
- youpaipofflineTitleL.font = LCFont16;
- youpaipofflineTitleL.textColor = HexColorFromRGB(0x9F9DA5);
- youpaipofflineTitleL.textAlignment = NSTextAlignmentCenter;
- [youpaipofflineBgV addSubview:youpaipofflineTitleL];
- self.youpaipofflineTitleL = youpaipofflineTitleL;
- [youpaipofflineTitleL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.offset(8.0f);
- make.right.offset(-8.0f);
- make.bottom.equalTo(youpaipofflineBgV.mas_centerY).offset(-3.0f);
- }];
-
- UILabel *youpaipofflineSubTitleL = [[UILabel alloc] init];
- youpaipofflineSubTitleL.text = @"休息片刻,马上回来";
- youpaipofflineSubTitleL.font = LCFont14;
- youpaipofflineSubTitleL.textColor = HexColorFromRGB(0x9F9DA5);
- youpaipofflineSubTitleL.textAlignment = NSTextAlignmentCenter;
- [youpaipofflineBgV addSubview:youpaipofflineSubTitleL];
- self.youpaipofflineSubTitleL = youpaipofflineSubTitleL;
- [youpaipofflineSubTitleL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.offset(8.0f);
- make.right.offset(-8.0f);
- make.top.equalTo(youpaipofflineBgV.mas_centerY).offset(3.0f);
- }];
-
-
- }
- - (void)setYoupaipisOff:(BOOL)youpaipisOff{
- _youpaipisOff = youpaipisOff;
- self.youpaipofflineBgV.hidden = !youpaipisOff;
- }
- @end
|