底部操作栏、更多菜单排序

This commit is contained in:
chenguilong
2022-05-12 20:18:57 +08:00
parent d8a951060a
commit 28494d9921
37 changed files with 185 additions and 99 deletions

View File

@@ -112,6 +112,7 @@
73FFADDC93E195344047A2EC /* Pods_xplan_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACF623970097D653132D69A /* Pods_xplan_ios.framework */; }; 73FFADDC93E195344047A2EC /* Pods_xplan_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CACF623970097D653132D69A /* Pods_xplan_ios.framework */; };
9B0086C627BA392B0032BD2B /* AnchorStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0086C527BA392B0032BD2B /* AnchorStageView.m */; }; 9B0086C627BA392B0032BD2B /* AnchorStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0086C527BA392B0032BD2B /* AnchorStageView.m */; };
9B0086CA27BA4F570032BD2B /* AnchorMicroView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0086C927BA4F570032BD2B /* AnchorMicroView.m */; }; 9B0086CA27BA4F570032BD2B /* AnchorMicroView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0086C927BA4F570032BD2B /* AnchorMicroView.m */; };
9B044D9D282D2A6400DE4859 /* XPRoomAnchorRankEnterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B044D9C282D2A6400DE4859 /* XPRoomAnchorRankEnterView.m */; };
9B060B5827BCAEE20001B767 /* AnchorGiftValueView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B060B5727BCAEE20001B767 /* AnchorGiftValueView.m */; }; 9B060B5827BCAEE20001B767 /* AnchorGiftValueView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B060B5727BCAEE20001B767 /* AnchorGiftValueView.m */; };
9B0997A127F19D8A00EB8F14 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 9B0997A027F19D8900EB8F14 /* README.md */; }; 9B0997A127F19D8A00EB8F14 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 9B0997A027F19D8900EB8F14 /* README.md */; };
9B0997A327F19DE500EB8F14 /* QGHWDShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = 9B0997A227F19DE500EB8F14 /* QGHWDShaders.metal */; }; 9B0997A327F19DE500EB8F14 /* QGHWDShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = 9B0997A227F19DE500EB8F14 /* QGHWDShaders.metal */; };
@@ -941,6 +942,8 @@
9B0086C527BA392B0032BD2B /* AnchorStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnchorStageView.m; sourceTree = "<group>"; }; 9B0086C527BA392B0032BD2B /* AnchorStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnchorStageView.m; sourceTree = "<group>"; };
9B0086C827BA4F570032BD2B /* AnchorMicroView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnchorMicroView.h; sourceTree = "<group>"; }; 9B0086C827BA4F570032BD2B /* AnchorMicroView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnchorMicroView.h; sourceTree = "<group>"; };
9B0086C927BA4F570032BD2B /* AnchorMicroView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnchorMicroView.m; sourceTree = "<group>"; }; 9B0086C927BA4F570032BD2B /* AnchorMicroView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnchorMicroView.m; sourceTree = "<group>"; };
9B044D9B282D2A6400DE4859 /* XPRoomAnchorRankEnterView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomAnchorRankEnterView.h; sourceTree = "<group>"; };
9B044D9C282D2A6400DE4859 /* XPRoomAnchorRankEnterView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomAnchorRankEnterView.m; sourceTree = "<group>"; };
9B060B5627BCAEE20001B767 /* AnchorGiftValueView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnchorGiftValueView.h; sourceTree = "<group>"; }; 9B060B5627BCAEE20001B767 /* AnchorGiftValueView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnchorGiftValueView.h; sourceTree = "<group>"; };
9B060B5727BCAEE20001B767 /* AnchorGiftValueView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnchorGiftValueView.m; sourceTree = "<group>"; }; 9B060B5727BCAEE20001B767 /* AnchorGiftValueView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnchorGiftValueView.m; sourceTree = "<group>"; };
9B0997A027F19D8900EB8F14 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; 9B0997A027F19D8900EB8F14 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
@@ -5102,6 +5105,8 @@
E877A7F327842EF800EFACED /* XPRoomDatingVipUpMicView.m */, E877A7F327842EF800EFACED /* XPRoomDatingVipUpMicView.m */,
9B86D88128192DC000494FCD /* XPRoomRankEntranceView.h */, 9B86D88128192DC000494FCD /* XPRoomRankEntranceView.h */,
9B86D88228192DC000494FCD /* XPRoomRankEntranceView.m */, 9B86D88228192DC000494FCD /* XPRoomRankEntranceView.m */,
9B044D9B282D2A6400DE4859 /* XPRoomAnchorRankEnterView.h */,
9B044D9C282D2A6400DE4859 /* XPRoomAnchorRankEnterView.m */,
); );
path = BaseUIContainerView; path = BaseUIContainerView;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -6374,6 +6379,7 @@
E8AC722426F47E5E007D6E91 /* XPMineFeedbackViewController.m in Sources */, E8AC722426F47E5E007D6E91 /* XPMineFeedbackViewController.m in Sources */,
E87E914E2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m in Sources */, E87E914E2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m in Sources */,
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */, 9B7D804D27537950003DAC0C /* MessageCell.m in Sources */,
9B044D9D282D2A6400DE4859 /* XPRoomAnchorRankEnterView.m in Sources */,
9B92C02227E0BD040044C5EA /* XPNobleTrumpetModel.m in Sources */, 9B92C02227E0BD040044C5EA /* XPNobleTrumpetModel.m in Sources */,
18F404C927609A4300A6C548 /* MessagePresenter.m in Sources */, 18F404C927609A4300A6C548 /* MessagePresenter.m in Sources */,
9BC9DAEF27E33B3F009EE409 /* XPRoomGiftAnimationParser.m in Sources */, 9BC9DAEF27E33B3F009EE409 /* XPRoomGiftAnimationParser.m in Sources */,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 966 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,22 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_menu_input_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_menu_input_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -10,6 +10,7 @@
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "room_menu_more@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"filename" : "room_menu_more3x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 873 B

After

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -90,6 +90,7 @@
self.noteImageView.hidden = _liveRoom.roomUid <=0; self.noteImageView.hidden = _liveRoom.roomUid <=0;
if (_liveRoom.roomUid > 0) { if (_liveRoom.roomUid > 0) {
self.noteImageView.animationImages = self.animationArray; self.noteImageView.animationImages = self.animationArray;
self.noteImageView.animationDuration = 0.5;
[self.noteImageView startAnimating]; [self.noteImageView startAnimating];
}else { }else {
self.noteImageView.animationImages = nil; self.noteImageView.animationImages = nil;
@@ -144,8 +145,7 @@
if (!_noteImageView) { if (!_noteImageView) {
_noteImageView = [[UIImageView alloc] init]; _noteImageView = [[UIImageView alloc] init];
_noteImageView.userInteractionEnabled = YES; _noteImageView.userInteractionEnabled = YES;
_noteImageView.animationRepeatCount = HUGE; _noteImageView.animationRepeatCount = 0;
_noteImageView.image = [UIImage imageNamed:@"home_note_0000"];
} }
return _noteImageView; return _noteImageView;
} }

View File

@@ -0,0 +1,16 @@
//
// XPRoomAnchorRankEnterView.h
// xplan-ios
//
// Created by GreenLand on 2022/5/12.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPRoomAnchorRankEnterView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,98 @@
//
// XPRoomAnchorRankEnterView.m
// xplan-ios
//
// Created by GreenLand on 2022/5/12.
//
#import "XPRoomAnchorRankEnterView.h"
///Third
#import <Masonry/Masonry.h>
#import "ThemeColor.h"
///Tool
#import "NetImageView.h"
@interface XPRoomAnchorRankEnterView ()
///
@property (nonatomic, strong) UIImageView *bgImageView;
///
@property (nonatomic, strong) UILabel *titleLabel;
///
@property (nonatomic, strong) UIImageView *iconImageView;
@end
@implementation XPRoomAnchorRankEnterView
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
CAGradientLayer *layer = [CAGradientLayer new];
layer.colors=@[(__bridge id)UIColorRGBAlpha(0x2B00CA, 0.55).CGColor,(__bridge id)UIColorRGBAlpha(0x170ACD, 0.2).CGColor];
layer.startPoint = CGPointMake(0, 0);
layer.endPoint = CGPointMake(1, 0);
layer.frame = self.bounds;
[self.bgImageView.layer addSublayer:layer];
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.bgImageView];
[self addSubview:self.titleLabel];
[self addSubview:self.iconImageView];
}
- (void)initSubViewConstraints {
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(11);
make.top.bottom.left.mas_equalTo(0);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self);
make.left.mas_equalTo(self.iconImageView.mas_right).mas_offset(4);
}];
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(22);
make.centerY.mas_equalTo(self);
make.left.mas_equalTo(0);
}];
}
#pragma mark - Getters And Setters
- (UIImageView *)bgImageView {
if (_bgImageView == nil) {
_bgImageView = [[UIImageView alloc] init];
_bgImageView.layer.cornerRadius = 11;
_bgImageView.layer.masksToBounds = YES;
}
return _bgImageView;
}
- (UIImageView *)iconImageView {
if (_iconImageView == nil) {
_iconImageView = [[UIImageView alloc] init];
_iconImageView.image = [UIImage imageNamed:@"anchor_hourRank_btn"];
_iconImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _iconImageView;
}
- (UILabel *)titleLabel {
if (_titleLabel == nil) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.textColor = UIColor.whiteColor;
_titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
_titleLabel.text = @"小时榜";
}
return _titleLabel;
}
@end

View File

@@ -61,6 +61,7 @@
#import "XPRoomTrumpetView.h" #import "XPRoomTrumpetView.h"
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPRoomRankEntranceView.h" #import "XPRoomRankEntranceView.h"
#import "XPRoomAnchorRankEnterView.h"
///PK ///PK
#import "XPAnchorFansTeamEntranceView.h" #import "XPAnchorFansTeamEntranceView.h"
#import "XPAnchorFansTeamViewController.h" #import "XPAnchorFansTeamViewController.h"
@@ -80,7 +81,7 @@
/// ///
@property (nonatomic, strong) XPAnchorFansTeamEntranceView *fansTeamEntranceView; @property (nonatomic, strong) XPAnchorFansTeamEntranceView *fansTeamEntranceView;
/// ///
@property (nonatomic, strong) UIButton *anchorHourRankButton; @property (nonatomic, strong) XPRoomAnchorRankEnterView *hourRankEntranceView;
/// ///
@property (nonatomic,strong) UIStackView *topicStackView; @property (nonatomic,strong) UIStackView *topicStackView;
/// ///
@@ -146,7 +147,7 @@
#pragma mark - Private Method #pragma mark - Private Method
- (void)initSubViews { - (void)initSubViews {
[self addSubview:self.contributeEnterView]; [self addSubview:self.contributeEnterView];
[self addSubview:self.anchorHourRankButton]; [self addSubview:self.hourRankEntranceView];
[self addSubview:self.topicStackView]; [self addSubview:self.topicStackView];
[self addSubview:self.fansTeamEntranceView]; [self addSubview:self.fansTeamEntranceView];
[self.topicStackView addArrangedSubview:self.topicLabel]; [self.topicStackView addArrangedSubview:self.topicLabel];
@@ -160,10 +161,10 @@
make.width.mas_equalTo(116); make.width.mas_equalTo(116);
make.height.mas_equalTo(22); make.height.mas_equalTo(22);
}]; }];
[self.anchorHourRankButton mas_makeConstraints:^(MASConstraintMaker *make) { [self.hourRankEntranceView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(11); make.right.mas_equalTo(0);
make.centerY.mas_equalTo(self.contributeEnterView); make.centerY.mas_equalTo(self.contributeEnterView);
make.width.mas_equalTo(67); make.width.mas_equalTo(69);
make.height.mas_equalTo(22); make.height.mas_equalTo(22);
}]; }];
[self.fansTeamEntranceView mas_makeConstraints:^(MASConstraintMaker *make) { [self.fansTeamEntranceView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -292,7 +293,7 @@
if (roomInfo.type == RoomType_Anchor) { if (roomInfo.type == RoomType_Anchor) {
self.contributeEnterView.title = @"主播榜"; self.contributeEnterView.title = @"主播榜";
self.fansTeamEntranceView.hidden = NO; self.fansTeamEntranceView.hidden = NO;
self.anchorHourRankButton.hidden = NO; self.hourRankEntranceView.hidden = NO;
if (!roomInfo.showGiftValue) { if (!roomInfo.showGiftValue) {
} }
if (roomInfo.hadChangeRoomType) { if (roomInfo.hadChangeRoomType) {
@@ -306,7 +307,7 @@
} else { } else {
self.contributeEnterView.title = @"房间榜"; self.contributeEnterView.title = @"房间榜";
self.fansTeamEntranceView.hidden = YES; self.fansTeamEntranceView.hidden = YES;
self.anchorHourRankButton.hidden = YES; self.hourRankEntranceView.hidden = YES;
if (roomInfo.hadChangeRoomType) { if (roomInfo.hadChangeRoomType) {
[self updateContrionEntranceWithRoomUid:[NSString stringWithFormat:@"%ld", roomInfo.uid] type:@"day"]; [self updateContrionEntranceWithRoomUid:[NSString stringWithFormat:@"%ld", roomInfo.uid] type:@"day"];
} }
@@ -767,7 +768,7 @@
} }
} }
- (void)onAnchorHourRankButtonAction:(UIButton *)sender { - (void)onAnchorHourRankButtonAction:(UITapGestureRecognizer *)ges {
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid]; NSString * roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid];
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init]; XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
webView.url = [NSString stringWithFormat:@"%@?roomUid=%@", URLWithType(kRoomHourRankURL), roomUid]; webView.url = [NSString stringWithFormat:@"%@?roomUid=%@", URLWithType(kRoomHourRankURL), roomUid];
@@ -1194,22 +1195,13 @@
return _contributeEnterView; return _contributeEnterView;
} }
- (UIButton *)anchorHourRankButton { - (XPRoomAnchorRankEnterView *)hourRankEntranceView {
if (!_anchorHourRankButton) { if (!_hourRankEntranceView) {
_anchorHourRankButton = [[UIButton alloc]init]; _hourRankEntranceView = [[XPRoomAnchorRankEnterView alloc] init];
[_anchorHourRankButton addTarget:self action:@selector(onAnchorHourRankButtonAction:) forControlEvents:UIControlEventTouchUpInside]; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onAnchorHourRankButtonAction:)];
[_anchorHourRankButton setTitle:@"小时榜" forState:UIControlStateNormal]; [_hourRankEntranceView addGestureRecognizer:tap];
[_anchorHourRankButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x322BFF), UIColorFromRGB(0x49ACFF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(67, 22)] forState:UIControlStateNormal];
[_anchorHourRankButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_anchorHourRankButton.titleLabel.font = [UIFont systemFontOfSize:10];
_anchorHourRankButton.layer.cornerRadius = 11;
_anchorHourRankButton.layer.masksToBounds = YES;
[_anchorHourRankButton setImage:[UIImage imageNamed:@"anchor_hourRank_btn"] forState:UIControlStateNormal];
_anchorHourRankButton.imageEdgeInsets = UIEdgeInsetsMake(1, -15, 0, 0);
_anchorHourRankButton.titleEdgeInsets = UIEdgeInsetsMake(0, -12, 0, 0);
_anchorHourRankButton.hidden = YES;
} }
return _anchorHourRankButton; return _hourRankEntranceView;
} }
- (UIButton *)datingProgresButton { - (UIButton *)datingProgresButton {

View File

@@ -15,7 +15,7 @@
@interface XPRoomRankEntranceView () @interface XPRoomRankEntranceView ()
/// ///
@property (nonatomic, strong) UIImageView *bgImageView; @property (nonatomic, strong) UIView *bgView;
/// ///
@property (nonatomic, strong) UIView *rankContentView; @property (nonatomic, strong) UIView *rankContentView;
/// ///
@@ -35,19 +35,9 @@
return self; return self;
} }
- (void)layoutSubviews {
[super layoutSubviews];
CAGradientLayer *layer = [CAGradientLayer new];
layer.colors=@[(__bridge id)UIColorRGBAlpha(0xFFB300, 0.5).CGColor,(__bridge id)UIColorRGBAlpha(0xFFCA45, 0).CGColor];
layer.startPoint = CGPointMake(0, 0);
layer.endPoint = CGPointMake(1, 0);
layer.frame = self.bounds;
[self.bgImageView.layer addSublayer:layer];
}
#pragma mark - Private Method #pragma mark - Private Method
- (void)initSubViews { - (void)initSubViews {
[self addSubview:self.bgImageView]; [self addSubview:self.bgView];
[self addSubview:self.rankContentView]; [self addSubview:self.rankContentView];
[self addSubview:self.titleLabel]; [self addSubview:self.titleLabel];
[self addSubview:self.iconImageView]; [self addSubview:self.iconImageView];
@@ -67,8 +57,9 @@
} }
- (void)initSubViewConstraints { - (void)initSubViewConstraints {
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(0); make.left.mas_equalTo(-11);
make.top.bottom.right.mas_equalTo(0);
}]; }];
[self.rankContentView mas_makeConstraints:^(MASConstraintMaker *make) { [self.rankContentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self); make.centerY.mas_equalTo(self);
@@ -105,11 +96,14 @@
} }
} }
- (UIImageView *)bgImageView { - (UIView *)bgView {
if (_bgImageView == nil) { if (_bgView == nil) {
_bgImageView = [[UIImageView alloc] init]; _bgView = [[UIView alloc] init];
_bgView.backgroundColor = UIColorRGBAlpha(0xFFFFFF, 0.2);
_bgView.layer.cornerRadius = 11;
_bgView.layer.masksToBounds = YES;
} }
return _bgImageView; return _bgView;
} }
- (UIView *)rankContentView { - (UIView *)rankContentView {
@@ -132,7 +126,7 @@
if (_titleLabel == nil) { if (_titleLabel == nil) {
_titleLabel = [[UILabel alloc] init]; _titleLabel = [[UILabel alloc] init];
_titleLabel.textColor = UIColor.whiteColor; _titleLabel.textColor = UIColor.whiteColor;
_titleLabel.font = [UIFont systemFontOfSize:12]; _titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
_titleLabel.text = @"房间榜"; _titleLabel.text = @"房间榜";
} }
return _titleLabel; return _titleLabel;

View File

@@ -14,6 +14,7 @@
#import "RtcManager.h" #import "RtcManager.h"
#import "XCHudTool.h" #import "XCHudTool.h"
#import "StatisticsServiceHelper.h" #import "StatisticsServiceHelper.h"
#import "Themecolor.h"
///Model ///Model
#import "XPRoomMenuItem.h" #import "XPRoomMenuItem.h"
#import "MicroQueueModel.h" #import "MicroQueueModel.h"
@@ -363,7 +364,7 @@
_inputButton.titleLabel.font = [UIFont systemFontOfSize:15]; _inputButton.titleLabel.font = [UIFont systemFontOfSize:15];
_inputButton.layer.masksToBounds = YES; _inputButton.layer.masksToBounds = YES;
_inputButton.layer.cornerRadius = 15; _inputButton.layer.cornerRadius = 15;
[_inputButton setBackgroundImage:[UIImage imageNamed:@"room_menu_input_bg"] forState:UIControlStateNormal]; _inputButton.backgroundColor = UIColorRGBAlpha(0xFFFFFF, 0.3);
_inputButton.tag = XPRoomMenuItemType_Input; _inputButton.tag = XPRoomMenuItemType_Input;
[_inputButton addTarget:self action:@selector(menuButtonAction:) forControlEvents:UIControlEventTouchUpInside]; [_inputButton addTarget:self action:@selector(menuButtonAction:) forControlEvents:UIControlEventTouchUpInside];
} }

View File

@@ -108,7 +108,6 @@
request.userIds = @[uid]; request.userIds = @[uid];
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) { [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
NSMutableArray * array = [NSMutableArray array]; NSMutableArray * array = [NSMutableArray array];
[array addObject:giftEffect];
if (error == nil) { if (error == nil) {
NIMChatroomMember * member = members.firstObject; NIMChatroomMember * member = members.firstObject;
BOOL isCreator = member.type == NIMChatroomMemberTypeCreator; BOOL isCreator = member.type == NIMChatroomMemberTypeCreator;
@@ -123,18 +122,24 @@
if (isCreator || isManager || isSuperAdmin) { if (isCreator || isManager || isSuperAdmin) {
if (roomInfo.canOpenBlindDate && roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame) { if (roomInfo.canOpenBlindDate && roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame) {
[array addObject:dating]; [array insertObject:dating atIndex:0];
} }
[array addObject:messageScreen];
[array addObject:clearScreen];
[array addObject:giftValue];
[array addObject:roomSetting];
[array addObject:inviteFriend]; [array addObject:inviteFriend];
[array addObject:trumpet];
if (isCreator && roomInfo.type != RoomType_Anchor && roomInfo.isPermitRoom != PermitRoomType_Licnese && roomInfo.isPermitRoom != PermitRoomType_YoungerStar) { if (isCreator && roomInfo.type != RoomType_Anchor && roomInfo.isPermitRoom != PermitRoomType_Licnese && roomInfo.isPermitRoom != PermitRoomType_YoungerStar) {
[array addObject:releaseRadio]; [array addObject:releaseRadio];
} }
} [array addObject:giftEffect];
[array addObject:roomSetting];
[array addObject:messageScreen];
[array addObject:clearScreen];
[array addObject:giftValue];
} else {
[array addObject:trumpet]; [array addObject:trumpet];
[array addObject:giftEffect];
}
} else {
[array addObject:giftEffect];
} }
[[self getView] getMoreMenuDataSuccess:array]; [[self getView] getMoreMenuDataSuccess:array];
}]; }];

View File

@@ -36,7 +36,8 @@
@property (nonatomic,strong) UILabel *miniLabel; @property (nonatomic,strong) UILabel *miniLabel;
///退 ///退
@property (nonatomic,strong) UILabel *exitLabel; @property (nonatomic,strong) UILabel *exitLabel;
///
@property (nonatomic, strong) UILabel *recommentLabel;
@end @end
@@ -62,6 +63,7 @@
[self.miniStackView addArrangedSubview:self.miniLabel]; [self.miniStackView addArrangedSubview:self.miniLabel];
[self.exitStackView addArrangedSubview:self.exitButton]; [self.exitStackView addArrangedSubview:self.exitButton];
[self.exitStackView addArrangedSubview:self.exitLabel]; [self.exitStackView addArrangedSubview:self.exitLabel];
[self addSubview:self.recommentLabel];
[self addSubview:self.tableView]; [self addSubview:self.tableView];
} }
@@ -97,9 +99,13 @@
[self.exitButton mas_makeConstraints:^(MASConstraintMaker *make) { [self.exitButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(54); make.width.height.mas_equalTo(54);
}]; }];
[self.recommentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.miniStackView.mas_bottom).mas_offset(16);
make.left.mas_equalTo(11);
}];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(0); make.left.right.bottom.mas_equalTo(0);
make.top.mas_equalTo(self.miniStackView.mas_bottom).mas_offset(8); make.top.mas_equalTo(self.recommentLabel.mas_bottom);
}]; }];
} }
@@ -258,6 +264,16 @@
return _exitLabel; return _exitLabel;
} }
- (UILabel *)recommentLabel {
if (!_recommentLabel) {
_recommentLabel = [[UILabel alloc] init];
_recommentLabel.text = @"为你推荐";
_recommentLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_recommentLabel.textColor = [UIColor whiteColor];
}
return _recommentLabel;
}
- (UITableView *)tableView { - (UITableView *)tableView {
if (!_tableView) { if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];