feat: 完成房间 UI 调整
@@ -503,6 +503,7 @@
|
||||
5412E0F42C4E460300FDD668 /* XPMineCenterAgencyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5412E0F32C4E460300FDD668 /* XPMineCenterAgencyView.m */; };
|
||||
5412E0FD2C52512100FDD668 /* RoomBottomEntranceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 5412E0FC2C52512100FDD668 /* RoomBottomEntranceModel.m */; };
|
||||
541DD9552C1EDEFB00B616C4 /* XPHomePagingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 541DD9542C1EDEFB00B616C4 /* XPHomePagingViewController.m */; };
|
||||
544A36352C94160F00CA7858 /* RoomMenuBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 544A36342C94160F00CA7858 /* RoomMenuBar.m */; };
|
||||
5456F3C82C6EF962000E1805 /* VIPCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5456F3C72C6EF962000E1805 /* VIPCenterViewController.m */; };
|
||||
5458319D2C2AE09300364026 /* XPRoomTypeSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5458319C2C2AE09300364026 /* XPRoomTypeSelectionViewController.m */; };
|
||||
545831A02C2AEFAF00364026 /* TenMicStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5458319F2C2AEFAF00364026 /* TenMicStageView.m */; };
|
||||
@@ -2541,6 +2542,8 @@
|
||||
5412E0FC2C52512100FDD668 /* RoomBottomEntranceModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomBottomEntranceModel.m; sourceTree = "<group>"; };
|
||||
541DD9532C1EDEFB00B616C4 /* XPHomePagingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomePagingViewController.h; sourceTree = "<group>"; };
|
||||
541DD9542C1EDEFB00B616C4 /* XPHomePagingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomePagingViewController.m; sourceTree = "<group>"; };
|
||||
544A36332C94160F00CA7858 /* RoomMenuBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomMenuBar.h; sourceTree = "<group>"; };
|
||||
544A36342C94160F00CA7858 /* RoomMenuBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomMenuBar.m; sourceTree = "<group>"; };
|
||||
5456F3C62C6EF962000E1805 /* VIPCenterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VIPCenterViewController.h; sourceTree = "<group>"; };
|
||||
5456F3C72C6EF962000E1805 /* VIPCenterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VIPCenterViewController.m; sourceTree = "<group>"; };
|
||||
5458319B2C2AE09300364026 /* XPRoomTypeSelectionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomTypeSelectionViewController.h; sourceTree = "<group>"; };
|
||||
@@ -10287,6 +10290,8 @@
|
||||
2320F63B2BDF738E00227EEB /* MSRoomMenuGameCell.m */,
|
||||
2320F6402BE0F53F00227EEB /* MSRoomMenuGameEmptyCell.h */,
|
||||
2320F6412BE0F53F00227EEB /* MSRoomMenuGameEmptyCell.m */,
|
||||
544A36332C94160F00CA7858 /* RoomMenuBar.h */,
|
||||
544A36342C94160F00CA7858 /* RoomMenuBar.m */,
|
||||
);
|
||||
path = MenuContainerView;
|
||||
sourceTree = "<group>";
|
||||
@@ -11936,6 +11941,7 @@
|
||||
E816C11527608A7500C84014 /* XPRoomMiniManager.m in Sources */,
|
||||
E81060EB2987BE8300B772F0 /* MessageGiftModel.m in Sources */,
|
||||
E8EEB91726FC7B35007C6EBA /* XPMineUserInfoDesViewController.m in Sources */,
|
||||
544A36352C94160F00CA7858 /* RoomMenuBar.m in Sources */,
|
||||
9B1B72AC280031DB003FACE9 /* XPAnchorPKViewController.m in Sources */,
|
||||
237852A12C072D8D00E360AC /* MSRoomGameModel.m in Sources */,
|
||||
180806FB2729A354001FD836 /* ThemeColor+Room.m in Sources */,
|
||||
|
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "crossroom_pk_menu_icon_ar@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "crossroom_pk_menu_icon_ar@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 106 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "crossroom_pk_menu_icon_en@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "crossroom_pk_menu_icon_en@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 103 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_music_player_enter@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_music_player_enter@3x.png",
|
||||
"filename" : "音乐@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
BIN
YuMi/Assets.xcassets/yna/BackMusic/room_music_player_enter.imageset/音乐@3x.png
vendored
Normal file
After Width: | Height: | Size: 7.4 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_menu_game@3x.png",
|
||||
"filename" : "更多@3x(1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 991 B |
BIN
YuMi/Assets.xcassets/yna/Menu/ms_room_menu_game.imageset/更多@3x(1).png
vendored
Normal file
After Width: | Height: | Size: 1.6 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_arrange_mic@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_arrange_mic@3x.png",
|
||||
"filename" : "更多@3x(3).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 831 B |
Before Width: | Height: | Size: 1.3 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_arrange_mic.imageset/更多@3x(3).png
vendored
Normal file
After Width: | Height: | Size: 1.8 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_arrange_mic_new@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_arrange_mic_new@3x.png",
|
||||
"filename" : "更多@3x(4).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 958 B |
Before Width: | Height: | Size: 1.5 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_arrange_mic_new.imageset/更多@3x(4).png
vendored
Normal file
After Width: | Height: | Size: 2.0 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_face@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_face@3x.png",
|
||||
"filename" : "表情@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 740 B |
Before Width: | Height: | Size: 1.2 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_face.imageset/表情@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_message@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_message@3x.png",
|
||||
"filename" : "私信@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 724 B |
Before Width: | Height: | Size: 1.2 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_message.imageset/私信@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_mic_close@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_mic_close@3x.png",
|
||||
"filename" : "麦克风@3x(1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 955 B |
Before Width: | Height: | Size: 1.5 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_mic_close.imageset/麦克风@3x(1).png
vendored
Normal file
After Width: | Height: | Size: 1.9 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_mic_open@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_mic_open@3x.png",
|
||||
"filename" : "麦克风@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 834 B |
Before Width: | Height: | Size: 1.3 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_mic_open.imageset/麦克风@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_more@3x.png",
|
||||
"filename" : "更多@3x(1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_more.imageset/更多@3x(1).png
vendored
Normal file
After Width: | Height: | Size: 1.6 KiB |
@@ -9,7 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_more_red@3x.png",
|
||||
"filename" : "更多@3x(2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.1 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_more_red.imageset/更多@3x(2).png
vendored
Normal file
After Width: | Height: | Size: 1.8 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_new_message@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_new_message@3x.png",
|
||||
"filename" : "私信@3x(1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 806 B |
Before Width: | Height: | Size: 1.5 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_new_message.imageset/私信@3x(1).png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_voice_close@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_voice_close@3x.png",
|
||||
"filename" : "扬声器@3x(1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 759 B |
Before Width: | Height: | Size: 1.1 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_voice_close.imageset/扬声器@3x(1).png
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_voice_open@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_voice_open@3x.png",
|
||||
"filename" : "扬声器@3x(2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 1004 B |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_voice_open.imageset/扬声器@3x(2).png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_more_menu_anchor_pk@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_more_menu_anchor_pk@3x.png",
|
||||
"filename" : "个播pk@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 14 KiB |
BIN
YuMi/Assets.xcassets/yna/MoreMenu/room_more_menu_anchor_pk.imageset/个播pk@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_rank_iocn@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_rank_iocn@3x.png",
|
||||
"filename" : "切图 4@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.9 KiB |
BIN
YuMi/Assets.xcassets/yna/Position/room_rank_iocn.imageset/切图 4@3x.png
vendored
Normal file
After Width: | Height: | Size: 6.5 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "crossroom_pk_menu_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "crossroom_pk_menu_icon@3x.png",
|
||||
"filename" : "跨房pk@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 104 KiB |
BIN
YuMi/Assets.xcassets/yna/crossroom_pk_menu_icon.imageset/跨房pk@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.3 KiB |
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_menu_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_menu_icon@3x.png",
|
||||
"filename" : "房间pk@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 96 KiB |
BIN
YuMi/Assets.xcassets/yna/room_pk_menu_icon.imageset/房间pk@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.3 KiB |
@@ -54,8 +54,8 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
|
||||
#define PI_Test_Flight @"TestFlight"
|
||||
#define ISTestFlight 0
|
||||
///正式环境
|
||||
#define API_HOST_URL @"https://api.hfighting.com"
|
||||
//#define API_HOST_URL @"https://api.molistar.xyz"
|
||||
//#define API_HOST_URL @"https://api.hfighting.com"
|
||||
#define API_HOST_URL @"https://api.molistar.xyz"
|
||||
///测试环境
|
||||
#define API_HOST_TEST_URL @"http://beta.api.molistar.xyz"
|
||||
|
||||
|
@@ -46,6 +46,7 @@
|
||||
uID:(NSString *)UID
|
||||
{
|
||||
LuckyGiftWinningFlagViewModel *model = [LuckyGiftWinningFlagViewModel modelWithDictionary:attachment.data];
|
||||
// LuckyGiftWinningFlagViewModel *model = [LuckyGiftWinningFlagViewModel modelWithJSON:attachment.data];
|
||||
if (model.roomId != roomID || model.uid != UID.integerValue) {
|
||||
return;
|
||||
}
|
||||
|
@@ -392,7 +392,6 @@
|
||||
|
||||
#pragma mark - 收到送礼者中奖飘屏
|
||||
- (void)receiveLuckGiftWinning:(AttachmentModel *)attachment {
|
||||
|
||||
RoomInfoModel *roomInfo = self.delegate.getRoomInfo;
|
||||
|
||||
[LuckyGiftWinningFlagView display:self
|
||||
|
@@ -276,6 +276,7 @@
|
||||
[self.rankStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(12);
|
||||
make.top.mas_equalTo(kNavigationHeight+4);
|
||||
make.height.mas_equalTo(27);
|
||||
}];
|
||||
|
||||
[self.hourRankEntranceView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -284,12 +285,11 @@
|
||||
}];
|
||||
|
||||
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
make.width.height.mas_equalTo(27);
|
||||
}];
|
||||
|
||||
[self.contributeEnterView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(22);
|
||||
make.height.mas_equalTo(27);
|
||||
make.width.mas_greaterThanOrEqualTo(50);
|
||||
}];
|
||||
|
||||
@@ -1836,7 +1836,7 @@
|
||||
_rankStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_rankStackView.distribution = UIStackViewDistributionFill;
|
||||
_rankStackView.alignment = UIStackViewAlignmentFill;
|
||||
_rankStackView.spacing = 5;
|
||||
_rankStackView.spacing = 9;
|
||||
}
|
||||
return _rankStackView;
|
||||
}
|
||||
@@ -1894,7 +1894,7 @@
|
||||
_musicEnterButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_musicEnterButton setImage:[UIImage imageNamed:@"room_music_player_enter"] forState:UIControlStateNormal];
|
||||
_musicEnterButton.layer.masksToBounds = YES;
|
||||
_musicEnterButton.layer.cornerRadius = 11;
|
||||
_musicEnterButton.layer.cornerRadius = 27/2;
|
||||
_musicEnterButton.backgroundColor = UIColorRGBAlpha(0xffffff, 0.2);
|
||||
[_musicEnterButton addTarget:self action:@selector(musicEnterButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
CAKeyframeAnimation *lAni = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation.z"];
|
||||
|
@@ -38,25 +38,22 @@
|
||||
[self addSubview:self.bgView];
|
||||
[self.bgView addSubview:self.titleLabel];
|
||||
[self.bgView addSubview:self.iconImageView];
|
||||
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.trailing.leading.equalTo(self);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.bgView);
|
||||
make.leading.mas_equalTo(26);
|
||||
make.trailing.mas_equalTo(-4);
|
||||
}];
|
||||
[self.iconImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(18);
|
||||
make.height.mas_equalTo(15);
|
||||
make.centerY.mas_equalTo(self.bgView);
|
||||
make.leading.mas_equalTo(5);
|
||||
}];
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.trailing.leading.equalTo(self);
|
||||
}];
|
||||
[self.iconImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(19);
|
||||
make.centerY.mas_equalTo(self.bgView);
|
||||
make.leading.mas_equalTo(9);
|
||||
}];
|
||||
[self.titleLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.bgView);
|
||||
make.leading.mas_equalTo(self.iconImageView.mas_trailing).offset(3);
|
||||
make.trailing.mas_equalTo(-4);
|
||||
}];
|
||||
}
|
||||
|
||||
BOOL isNumeric(NSString *string) {
|
||||
@@ -106,8 +103,8 @@ BOOL isNumeric(NSString *string) {
|
||||
- (UIView *)bgView {
|
||||
if (_bgView == nil) {
|
||||
_bgView = [[UIView alloc] init];
|
||||
_bgView.backgroundColor = UIColorRGBAlpha(0xFFFFFF, 0.2);
|
||||
_bgView.layer.cornerRadius = 12;
|
||||
_bgView.backgroundColor = UIColorRGBAlpha(0xFFFFFF, 0.4);
|
||||
_bgView.layer.cornerRadius = 27/2;
|
||||
_bgView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _bgView;
|
||||
@@ -127,8 +124,8 @@ BOOL isNumeric(NSString *string) {
|
||||
if (_titleLabel == nil) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.textColor = [UIColor colorWithWhite:1 alpha:0.8];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:9 weight:UIFontWeightBold];
|
||||
_titleLabel.text = @"0"; YMLocalizedString(@"XPRoomRankEntranceView0");
|
||||
_titleLabel.font = kFontRegular(12);
|
||||
_titleLabel.text = @"0";
|
||||
_titleLabel.numberOfLines = 2;
|
||||
}
|
||||
return _titleLabel;
|
||||
|
@@ -70,9 +70,8 @@
|
||||
[self updateGamePlayList:@[]];
|
||||
break;
|
||||
case MSRoomMenuTypeGame:
|
||||
[self getGameData];
|
||||
break;
|
||||
case MSRoomMenuTypeLittleGame:
|
||||
[self getGameData];
|
||||
[self getLittleGameList];
|
||||
break;
|
||||
default:
|
||||
@@ -84,17 +83,16 @@
|
||||
NSMutableArray *resourceList = [self.hostDelegate getPlayList];
|
||||
if(resourceList.count > 0){
|
||||
self.gameView.playList = resourceList;
|
||||
return;
|
||||
} else {
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||
@kWeakify(self);
|
||||
[Api getPlayList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
@kStrongify(self);
|
||||
self.gameView.playList = [[ActivityInfoModel modelsWithArray:data.data] mutableCopy];
|
||||
}
|
||||
} roomId:roomId];
|
||||
}
|
||||
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||
@kWeakify(self);
|
||||
[Api getPlayList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
@kStrongify(self);
|
||||
self.gameView.playList = [[ActivityInfoModel modelsWithArray:data.data] mutableCopy];
|
||||
}
|
||||
} roomId:roomId];
|
||||
}
|
||||
|
||||
- (void)updateGamePlayList:(NSArray *)array {
|
||||
@@ -127,19 +125,18 @@
|
||||
- (void)getLittleGameList {
|
||||
NSMutableArray *resourceList = [self.hostDelegate getLittleGameList];
|
||||
if(resourceList.count > 0){
|
||||
_gameView.littleGameList = resourceList;
|
||||
return;
|
||||
}
|
||||
|
||||
@kWeakify(self);
|
||||
[Api getLittleGameList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
@kStrongify(self);
|
||||
NSArray * array = [LittleGameInfoModel modelsWithArray:data.data];
|
||||
self.gameView.littleGameList = array.mutableCopy;
|
||||
self.gameView.littleGameList = resourceList;
|
||||
} else {
|
||||
@kWeakify(self);
|
||||
[Api getLittleGameList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
@kStrongify(self);
|
||||
NSArray * array = [LittleGameInfoModel modelsWithArray:data.data];
|
||||
self.gameView.littleGameList = array.mutableCopy;
|
||||
}
|
||||
}
|
||||
roomUid:@""];
|
||||
}
|
||||
roomUid:@""];
|
||||
}
|
||||
|
||||
-(void)installUI{
|
||||
|
@@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface MSRoomMenuGameView : UIView
|
||||
@property(nonatomic,strong) NSMutableArray *playList; // ActivityInfoModel & XPRoomMoreItemModel
|
||||
@property(nonatomic,strong) NSMutableArray<LittleGameInfoModel *> *littleGameList;
|
||||
@property (nonatomic, strong) NSMutableArray *dataSource;
|
||||
@property(nonatomic,weak) id<MSRoomMenuGameViewDelegate>delegate;
|
||||
@end
|
||||
|
||||
|
@@ -27,6 +27,7 @@ static const NSInteger kItemsPerRow = 5;
|
||||
if(self){
|
||||
|
||||
self.itemHeight = kGetScaleWidth(80);
|
||||
self.dataSource = @[].mutableCopy;
|
||||
|
||||
[self installUI];
|
||||
[self installConstraints];
|
||||
@@ -60,7 +61,8 @@ static const NSInteger kItemsPerRow = 5;
|
||||
}
|
||||
-(void)setPlayList:(NSMutableArray *)playList {
|
||||
_playList = playList;
|
||||
[self updateViewHeightWithItemCount:_playList.count];
|
||||
[self.dataSource addObjectsFromArray:playList];
|
||||
[self updateViewHeightWithItemCount:self.dataSource.count];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.collectionView reloadData];
|
||||
});
|
||||
@@ -68,7 +70,8 @@ static const NSInteger kItemsPerRow = 5;
|
||||
|
||||
- (void)setLittleGameList:(NSMutableArray<LittleGameInfoModel *> *)littleGameList {
|
||||
_littleGameList = littleGameList;
|
||||
[self updateViewHeightWithItemCount:_littleGameList.count];
|
||||
[self.dataSource addObjectsFromArray:littleGameList];
|
||||
[self updateViewHeightWithItemCount:self.dataSource.count];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.collectionView reloadData];
|
||||
});
|
||||
@@ -101,7 +104,7 @@ static const NSInteger kItemsPerRow = 5;
|
||||
}
|
||||
|
||||
- (NSInteger)countOfCurrentType {
|
||||
return self.littleGameList.count > 0 ? self.littleGameList.count : self.playList.count;
|
||||
return self.dataSource.count;// self.littleGameList.count > 0 ? self.littleGameList.count : self.playList.count;
|
||||
}
|
||||
|
||||
#pragma mark- UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout
|
||||
@@ -122,31 +125,46 @@ static const NSInteger kItemsPerRow = 5;
|
||||
}
|
||||
|
||||
MSRoomMenuGameCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MSRoomMenuGameCell class]) forIndexPath:indexPath];
|
||||
if (_littleGameList.count > 0){
|
||||
cell.littleGameModel = [self.littleGameList xpSafeObjectAtIndex:indexPath.row];
|
||||
} else {
|
||||
id model = [self.playList xpSafeObjectAtIndex:indexPath.row];
|
||||
|
||||
// if (_littleGameList.count > 0){
|
||||
// cell.littleGameModel = [self.littleGameList xpSafeObjectAtIndex:indexPath.row];
|
||||
// } else {
|
||||
id model = [self.dataSource xpSafeObjectAtIndex:indexPath.row];
|
||||
if ([model isKindOfClass:[XPRoomMoreItemModel class]]) {
|
||||
cell.moreItemModel = model;
|
||||
} else if ([model isKindOfClass:[ActivityInfoModel class]]) {
|
||||
cell.model = model;
|
||||
} else {
|
||||
cell.littleGameModel = model;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
return cell;
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (self.delegate) {
|
||||
if (self.littleGameList != nil &&
|
||||
self.littleGameList.count > 0 &&
|
||||
[self.delegate respondsToSelector:@selector(ms_didSelectLittleGameItemAtIndexPath:)]) {
|
||||
[self.delegate ms_didSelectLittleGameItemAtIndexPath:[self.littleGameList xpSafeObjectAtIndex:indexPath.row]];
|
||||
}
|
||||
else if (self.playList != nil &&
|
||||
self.playList.count > 0 &&
|
||||
[self.delegate respondsToSelector:@selector(ms_didSelectItemAtIndexPath:)]) {
|
||||
[self.delegate ms_didSelectItemAtIndexPath:[self.playList xpSafeObjectAtIndex:indexPath.row]];
|
||||
|
||||
if (self.dataSource.count > 0 && self.delegate) {
|
||||
id model = [self.dataSource xpSafeObjectAtIndex:indexPath.row];
|
||||
if ([model isKindOfClass:[LittleGameInfoModel class]]) {
|
||||
if ([self.delegate respondsToSelector:@selector(ms_didSelectLittleGameItemAtIndexPath:)]) {
|
||||
[self.delegate ms_didSelectLittleGameItemAtIndexPath:model];
|
||||
}
|
||||
} else {
|
||||
if ([self.delegate respondsToSelector:@selector(ms_didSelectItemAtIndexPath:)]) {
|
||||
[self.delegate ms_didSelectItemAtIndexPath:model];
|
||||
}
|
||||
}
|
||||
|
||||
// if (self.littleGameList != nil &&
|
||||
// self.littleGameList.count > 0 &&
|
||||
// [self.delegate respondsToSelector:@selector(ms_didSelectLittleGameItemAtIndexPath:)]) {
|
||||
// [self.delegate ms_didSelectLittleGameItemAtIndexPath:[self.littleGameList xpSafeObjectAtIndex:indexPath.row]];
|
||||
// }
|
||||
// else if (self.playList != nil &&
|
||||
// self.playList.count > 0 &&
|
||||
// [self.delegate respondsToSelector:@selector(ms_didSelectItemAtIndexPath:)]) {
|
||||
// [self.delegate ms_didSelectItemAtIndexPath:[self.playList xpSafeObjectAtIndex:indexPath.row]];
|
||||
// }
|
||||
}
|
||||
}
|
||||
#pragma mark - 懒加载
|
||||
|
20
YuMi/Modules/YMRoom/View/MenuContainerView/RoomMenuBar.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// RoomMenuBar.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/9/13.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "RoomGuestDelegate.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RoomMenuBar : UIView<RoomGuestDelegate>
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
35
YuMi/Modules/YMRoom/View/MenuContainerView/RoomMenuBar.m
Normal file
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// RoomMenuBar.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/9/13.
|
||||
//
|
||||
|
||||
#import "RoomMenuBar.h"
|
||||
|
||||
@interface RoomMenuBar ()
|
||||
|
||||
@property (nonatomic,weak) id<RoomHostDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RoomMenuBar
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.delegate = delegate;
|
||||
[self setupUI];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showGiftView:) name:@"kShowGiftView" object:nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setupUI {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@end
|
@@ -37,10 +37,9 @@
|
||||
#import "SVGA.h"
|
||||
|
||||
@interface XPRoomMenuContainerView ()<XPRoomMessageBubbleViewDelegate>
|
||||
///滚动的容器
|
||||
@property (nonatomic,strong) UIScrollView *scrollView;
|
||||
|
||||
///
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
//@property (nonatomic,strong) UIStackView *stackView;
|
||||
///输入框
|
||||
@property (nonatomic,strong) UIButton *inputButton;
|
||||
///麦
|
||||
@@ -107,7 +106,6 @@
|
||||
} else {
|
||||
self.inputTextView = [XPRoomSendTextView showTextView:self.superview delegate:self.delegate atUid:nil atNick:nil];
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -237,37 +235,30 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.inputButton];
|
||||
[self addSubview:self.scrollView];
|
||||
[self addSubview:self.svgDisplayView];
|
||||
[self addSubview:self.giftButton];
|
||||
|
||||
[self.scrollView addSubview:self.stackView];
|
||||
// self.backgroundColor = UIColorRGBAlpha(0xFFFFFF, 0.2);
|
||||
|
||||
[self.stackView addArrangedSubview:self.micButton];
|
||||
[self.stackView addArrangedSubview:self.voiceButton];
|
||||
[self.stackView addArrangedSubview:self.faceButton];
|
||||
[self.stackView addArrangedSubview:self.arrangeMicButton];
|
||||
[self.stackView addArrangedSubview:self.messageButton];
|
||||
[self.stackView addArrangedSubview:self.moreButton];
|
||||
[self.stackView addArrangedSubview:self.baiShunGameButton];
|
||||
[self.stackView addArrangedSubview:self.pkButton];
|
||||
UIStackView *stack = [[UIStackView alloc] init];
|
||||
stack.spacing = 9;
|
||||
stack.alignment = UIStackViewAlignmentBottom;
|
||||
// stack.backgroundColor = [UIColor systemPurpleColor];
|
||||
[self addSubview:stack];
|
||||
[stack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self).offset(15);
|
||||
make.trailing.mas_equalTo(self).offset(-15);
|
||||
make.height.mas_equalTo(46);
|
||||
}];
|
||||
|
||||
self.backgroundColor = UIColorRGBAlpha(0xFFFFFF, 0.2);
|
||||
CAShapeLayer * layer = [CAShapeLayer layer];
|
||||
layer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, 52 +kSafeAreaBottomHeight) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(23, 23)].CGPath;
|
||||
// self.layer.shadowColor = UIColorRGBAlpha(0xFFFFFF, 0.1).CGColor;
|
||||
// self.layer.shadowOffset = CGSizeMake(0, 5);
|
||||
self.layer.mask = layer;
|
||||
|
||||
if (isMSRTL()) {
|
||||
self.scrollView.transform = CGAffineTransformMakeRotation(M_PI);
|
||||
self.stackView.transform = CGAffineTransformMakeRotation(M_PI);
|
||||
}else{
|
||||
self.scrollView.transform = CGAffineTransformIdentity;
|
||||
self.stackView.transform = CGAffineTransformIdentity;
|
||||
}
|
||||
[stack addArrangedSubview:self.inputButton];
|
||||
[stack addArrangedSubview:self.micButton];
|
||||
[stack addArrangedSubview:self.voiceButton];
|
||||
[stack addArrangedSubview:self.arrangeMicButton];
|
||||
[stack addArrangedSubview:self.messageButton];
|
||||
[stack addArrangedSubview:self.moreButton];
|
||||
[stack addArrangedSubview:self.svgDisplayView];
|
||||
|
||||
[stack addSubview:self.faceButton];
|
||||
[stack addSubview:self.giftButton];
|
||||
|
||||
@kWeakify(self);
|
||||
[self.parser parseWithNamed:@"ms_room_gift_svga_icon" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
@@ -277,30 +268,67 @@
|
||||
[self.svgDisplayView startAnimation];
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
}];
|
||||
|
||||
return;
|
||||
|
||||
// [self.stackView addArrangedSubview:self.micButton];
|
||||
// [self.stackView addArrangedSubview:self.voiceButton];
|
||||
// [self.stackView addArrangedSubview:self.faceButton];
|
||||
// [self.stackView addArrangedSubview:self.arrangeMicButton];
|
||||
// [self.stackView addArrangedSubview:self.messageButton];
|
||||
// [self.stackView addArrangedSubview:self.moreButton];
|
||||
// [self.stackView addArrangedSubview:self.baiShunGameButton];
|
||||
// [self.stackView addArrangedSubview:self.pkButton];
|
||||
|
||||
|
||||
// if (isMSRTL()) {
|
||||
// self.stackView.transform = CGAffineTransformMakeRotation(M_PI);
|
||||
// }else{
|
||||
// self.stackView.transform = CGAffineTransformIdentity;
|
||||
// }
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self).offset(16);
|
||||
make.height.mas_equalTo(29);
|
||||
make.leading.mas_equalTo(self.inputButton.mas_trailing).offset(15);
|
||||
make.trailing.mas_equalTo(self.giftButton.mas_leading).offset(-11);
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.leading.trailing.height.mas_equalTo(self.scrollView);
|
||||
}];
|
||||
// [self.scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(self).offset(16);
|
||||
// make.height.mas_equalTo(29);
|
||||
// make.leading.mas_equalTo(self.inputButton.mas_trailing).offset(15);
|
||||
// make.trailing.mas_equalTo(self.giftButton.mas_leading).offset(-11);
|
||||
// }];
|
||||
//
|
||||
// [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.bottom.leading.trailing.height.mas_equalTo(self.scrollView);
|
||||
// }];
|
||||
|
||||
[self.inputButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(16);
|
||||
make.size.mas_equalTo(CGSizeMake(90, 28));
|
||||
make.leading.mas_equalTo(16);
|
||||
// make.top.mas_equalTo(16);
|
||||
make.size.mas_equalTo(CGSizeMake(110, 36));
|
||||
// make.leading.mas_equalTo(16);
|
||||
}];
|
||||
|
||||
[self.faceButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.inputButton);
|
||||
make.trailing.mas_equalTo(self.inputButton).offset(-7);
|
||||
make.width.height.mas_equalTo(22);
|
||||
}];
|
||||
|
||||
[self.micButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(36);
|
||||
}];
|
||||
[self.voiceButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(36);
|
||||
}];
|
||||
[self.messageButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(36);
|
||||
}];
|
||||
[self.moreButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(36);
|
||||
}];
|
||||
|
||||
[self.svgDisplayView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.scrollView);
|
||||
make.size.mas_equalTo(CGSizeMake(32, 32));
|
||||
make.trailing.mas_equalTo(self).offset(-15);
|
||||
// make.centerY.mas_equalTo(self.scrollView);
|
||||
make.size.mas_equalTo(CGSizeMake(46, 46));
|
||||
// make.trailing.mas_equalTo(self).offset(-15);
|
||||
}];
|
||||
[self.giftButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.svgDisplayView);
|
||||
@@ -542,11 +570,15 @@
|
||||
_inputButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_inputButton setTitle:YMLocalizedString(@"XPRoomMenuContainerView2") forState:UIControlStateNormal];
|
||||
[_inputButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_inputButton.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
||||
_inputButton.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
|
||||
_inputButton.titleLabel.numberOfLines = 2;
|
||||
_inputButton.layer.masksToBounds = YES;
|
||||
_inputButton.layer.cornerRadius = 14;
|
||||
_inputButton.backgroundColor = UIColorRGBAlpha(0x184450, 0.25);
|
||||
_inputButton.layer.cornerRadius = 18;
|
||||
// 设置标题左对齐
|
||||
_inputButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
|
||||
// 设置标题的边距
|
||||
_inputButton.titleEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
|
||||
_inputButton.backgroundColor = [UIColor colorWithWhite:0 alpha:0.4];
|
||||
_inputButton.tag = XPRoomMenuItemType_Input;
|
||||
[_inputButton addTarget:self action:@selector(menuButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
@@ -646,16 +678,16 @@
|
||||
}
|
||||
return _parser;
|
||||
}
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentLeading;
|
||||
_stackView.spacing = 11;
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
//- (UIStackView *)stackView {
|
||||
// if (!_stackView) {
|
||||
// _stackView = [[UIStackView alloc] init];
|
||||
// _stackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
// _stackView.distribution = UIStackViewDistributionFill;
|
||||
// _stackView.alignment = UIStackViewAlignmentLeading;
|
||||
// _stackView.spacing = 11;
|
||||
// }
|
||||
// return _stackView;
|
||||
//}
|
||||
|
||||
- (UIButton *)arrangeMicButton {
|
||||
if (!_arrangeMicButton) {
|
||||
@@ -669,15 +701,6 @@
|
||||
return _arrangeMicButton;
|
||||
}
|
||||
|
||||
- (UIScrollView *)scrollView {
|
||||
if (!_scrollView) {
|
||||
_scrollView = [[UIScrollView alloc] init];
|
||||
_scrollView.backgroundColor = [UIColor clearColor];
|
||||
_scrollView.showsHorizontalScrollIndicator = NO;
|
||||
}
|
||||
return _scrollView;
|
||||
}
|
||||
|
||||
- (XPRoomMessageBubbleView *)miniMessageView {
|
||||
if (!_miniMessageView) {
|
||||
_miniMessageView = [[XPRoomMessageBubbleView alloc] init];
|
||||
|
@@ -26,17 +26,17 @@
|
||||
@implementation XPMoreMenuPresenter
|
||||
|
||||
- (void)getMoreMenuDataSource:(RoomInfoModel *)roomInfo isSuperAdmin:(BOOL)isSuperAdmin {
|
||||
// XPRoomMoreItemModel * roomPK = [[XPRoomMoreItemModel alloc] init];
|
||||
// roomPK.title = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ?YMLocalizedString(@"XPMoreMenuPresenter26") : YMLocalizedString(@"XPMoreMenuPresenter1");
|
||||
// roomPK.imageName= @"room_pk_menu_icon";
|
||||
// roomPK.type = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? RoomMoreMenuType_Room_PK_Close : RoomMoreMenuType_Room_PK_Open;
|
||||
// roomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
||||
XPRoomMoreItemModel * roomPK = [[XPRoomMoreItemModel alloc] init];
|
||||
roomPK.title = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ?YMLocalizedString(@"XPMoreMenuPresenter26") : YMLocalizedString(@"XPMoreMenuPresenter1");
|
||||
roomPK.imageName= @"room_pk_menu_icon";
|
||||
roomPK.type = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? RoomMoreMenuType_Room_PK_Close : RoomMoreMenuType_Room_PK_Open;
|
||||
roomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
||||
|
||||
// XPRoomMoreItemModel * acrossRoomPK = [[XPRoomMoreItemModel alloc] init];
|
||||
// acrossRoomPK.title = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? YMLocalizedString(@"XPMoreMenuPresenter30") : YMLocalizedString(@"XPMoreMenuPresenter31");
|
||||
// acrossRoomPK.imageName = @"crossroom_pk_menu_icon";
|
||||
// acrossRoomPK.type = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? RoomMoreMenuType_Room_Across_PK_Close : RoomMoreMenuType_Room_Across_PK_Open;
|
||||
// acrossRoomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
||||
XPRoomMoreItemModel * acrossRoomPK = [[XPRoomMoreItemModel alloc] init];
|
||||
acrossRoomPK.title = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? YMLocalizedString(@"XPMoreMenuPresenter30") : YMLocalizedString(@"XPMoreMenuPresenter31");
|
||||
acrossRoomPK.imageName = @"crossroom_pk_menu_icon";
|
||||
acrossRoomPK.type = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? RoomMoreMenuType_Room_Across_PK_Close : RoomMoreMenuType_Room_Across_PK_Open;
|
||||
acrossRoomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
||||
|
||||
// XPRoomMoreItemModel * giftValue = [[XPRoomMoreItemModel alloc] init];
|
||||
// giftValue.title = roomInfo.showGiftValue ? YMLocalizedString(@"XPMoreMenuPresenter27") : YMLocalizedString(@"XPMoreMenuPresenter3");
|
||||
@@ -149,27 +149,31 @@
|
||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||
request.roomId = roomId;
|
||||
request.userIds = @[uid];
|
||||
// __block
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||
NSMutableArray * array = [NSMutableArray array];
|
||||
BOOL isCreator = NO;
|
||||
BOOL isManager = NO;
|
||||
NSInteger indexOfRoomAlbum = 0;
|
||||
if (error == nil) {
|
||||
NIMChatroomMember * member = members.firstObject;
|
||||
isCreator = member.type == NIMChatroomMemberTypeCreator;
|
||||
isManager = member.type == NIMChatroomMemberTypeManager;
|
||||
// if ((isCreator || isManager || isSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
|
||||
// [array addObject:roomPK];
|
||||
// }
|
||||
if ((isCreator || isManager || isSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
|
||||
[array addObject:roomPK];
|
||||
indexOfRoomAlbum += 1;
|
||||
}
|
||||
|
||||
// if (isCreator && roomInfo.type != RoomType_MiniGame) {
|
||||
// if(roomInfo.type != RoomType_Anchor){
|
||||
// [array addObject:acrossRoomPK];
|
||||
// }
|
||||
// }
|
||||
if (isCreator && roomInfo.type != RoomType_MiniGame) {
|
||||
if(roomInfo.type != RoomType_Anchor){
|
||||
[array addObject:acrossRoomPK];
|
||||
indexOfRoomAlbum += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (isCreator && roomInfo.type == RoomType_Anchor) {
|
||||
[array addObject:anchorRoomPK];
|
||||
|
||||
indexOfRoomAlbum += 1;
|
||||
}
|
||||
|
||||
if ((isCreator || isManager || isSuperAdmin) && roomInfo.hasWishGiftPermit) {
|
||||
@@ -179,6 +183,7 @@
|
||||
if (isCreator || isManager || isSuperAdmin) {
|
||||
if (roomInfo.canOpenBlindDate && roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame) {
|
||||
[array insertObject:dating atIndex:0];
|
||||
indexOfRoomAlbum += 1;
|
||||
}
|
||||
// [array addObject:inviteFriend];
|
||||
[array addObject:trumpet];
|
||||
@@ -208,7 +213,7 @@
|
||||
}
|
||||
|
||||
if(roomInfo.hasRoomAlbum == YES){
|
||||
[array insertObject:roomPhotoAlbum atIndex:1];
|
||||
[array insertObject:roomPhotoAlbum atIndex:indexOfRoomAlbum];
|
||||
}
|
||||
if ([ClientConfig shareConfig].configInfo.redEnvelopeConfig.open && roomInfo.redEnvelopeOpen) {
|
||||
[array insertObject:redPacket atIndex:1];
|
||||
|
@@ -84,6 +84,7 @@
|
||||
#import "XPCandyTreeInsufficientBalanceView.h"
|
||||
|
||||
#import "GiftComboManager.h"
|
||||
#import "LuckyGiftWinningFlagView.h"
|
||||
|
||||
UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
||||
@@ -1234,6 +1235,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
self.roomInfo = roomInfo;
|
||||
self.userInfo = userInfo;
|
||||
|
||||
|
||||
@kWeakify(self);
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_global_queue(0, 0), ^{
|
||||
@kStrongify(self);
|
||||
|