完善个人资料页功能
完成多麦位 Bug fix
@@ -521,6 +521,10 @@
|
||||
23FF42792AA6E19C0055733C /* HomeMenuSourceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF42782AA6E19C0055733C /* HomeMenuSourceModel.m */; };
|
||||
23FF428E2AAB2D3A0055733C /* XPCandyTreeBuyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF428D2AAB2D3A0055733C /* XPCandyTreeBuyView.m */; };
|
||||
541DD9552C1EDEFB00B616C4 /* XPHomePagingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 541DD9542C1EDEFB00B616C4 /* XPHomePagingViewController.m */; };
|
||||
5458319D2C2AE09300364026 /* XPRoomTypeSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5458319C2C2AE09300364026 /* XPRoomTypeSelectionViewController.m */; };
|
||||
545831A02C2AEFAF00364026 /* TenMicStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5458319F2C2AEFAF00364026 /* TenMicStageView.m */; };
|
||||
545831A32C2AF01100364026 /* FifteenMicStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 545831A22C2AF01100364026 /* FifteenMicStageView.m */; };
|
||||
545831A62C2C085C00364026 /* ArabMicroView.m in Sources */ = {isa = PBXBuildFile; fileRef = 545831A52C2C085C00364026 /* ArabMicroView.m */; };
|
||||
545888332C1AFFB500897585 /* XPRoomPKPanelView.m in Sources */ = {isa = PBXBuildFile; fileRef = 545888322C1AFFB500897585 /* XPRoomPKPanelView.m */; };
|
||||
545888362C1C306B00897585 /* XPRoomPKPaneAvatarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 545888352C1C306B00897585 /* XPRoomPKPaneAvatarView.m */; };
|
||||
547853A12C258F2A00F45E60 /* XPMineUserViewHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 547853A02C258F2A00F45E60 /* XPMineUserViewHeader.m */; };
|
||||
@@ -528,7 +532,6 @@
|
||||
54C3895F2C2189DD00FD47B1 /* XPHomeMinePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C3895E2C2189DD00FD47B1 /* XPHomeMinePresenter.m */; };
|
||||
54C389622C23BD1600FD47B1 /* HomeRankAvatarModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C389612C23BD1600FD47B1 /* HomeRankAvatarModel.m */; };
|
||||
54C389672C24464600FD47B1 /* HomeMineRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C389662C24464600FD47B1 /* HomeMineRoomModel.m */; };
|
||||
54F4692F2C280CF100A83655 /* XPMineUserInfoViewControllerV2.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F4692E2C280CF100A83655 /* XPMineUserInfoViewControllerV2.m */; };
|
||||
54F469352C29711400A83655 /* XPMomentUserDataViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F469342C29711400A83655 /* XPMomentUserDataViewController.m */; };
|
||||
54F469382C29C3B400A83655 /* XPMineAlbumTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F469372C29C3B400A83655 /* XPMineAlbumTableViewCell.m */; };
|
||||
54F4693B2C2A984D00A83655 /* MedalModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F4693A2C2A984D00A83655 /* MedalModel.m */; };
|
||||
@@ -2573,6 +2576,14 @@
|
||||
23FF428D2AAB2D3A0055733C /* XPCandyTreeBuyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeBuyView.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>"; };
|
||||
5458319B2C2AE09300364026 /* XPRoomTypeSelectionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomTypeSelectionViewController.h; sourceTree = "<group>"; };
|
||||
5458319C2C2AE09300364026 /* XPRoomTypeSelectionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomTypeSelectionViewController.m; sourceTree = "<group>"; };
|
||||
5458319E2C2AEFAF00364026 /* TenMicStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TenMicStageView.h; sourceTree = "<group>"; };
|
||||
5458319F2C2AEFAF00364026 /* TenMicStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TenMicStageView.m; sourceTree = "<group>"; };
|
||||
545831A12C2AF01100364026 /* FifteenMicStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FifteenMicStageView.h; sourceTree = "<group>"; };
|
||||
545831A22C2AF01100364026 /* FifteenMicStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FifteenMicStageView.m; sourceTree = "<group>"; };
|
||||
545831A42C2C085C00364026 /* ArabMicroView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ArabMicroView.h; sourceTree = "<group>"; };
|
||||
545831A52C2C085C00364026 /* ArabMicroView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ArabMicroView.m; sourceTree = "<group>"; };
|
||||
545888312C1AFFB500897585 /* XPRoomPKPanelView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKPanelView.h; sourceTree = "<group>"; };
|
||||
545888322C1AFFB500897585 /* XPRoomPKPanelView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKPanelView.m; sourceTree = "<group>"; };
|
||||
545888342C1C306B00897585 /* XPRoomPKPaneAvatarView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKPaneAvatarView.h; sourceTree = "<group>"; };
|
||||
@@ -2588,8 +2599,6 @@
|
||||
54C389642C24448900FD47B1 /* XPHomeMineProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeMineProtocol.h; sourceTree = "<group>"; };
|
||||
54C389652C24464600FD47B1 /* HomeMineRoomModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeMineRoomModel.h; sourceTree = "<group>"; };
|
||||
54C389662C24464600FD47B1 /* HomeMineRoomModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeMineRoomModel.m; sourceTree = "<group>"; };
|
||||
54F4692D2C280CF100A83655 /* XPMineUserInfoViewControllerV2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineUserInfoViewControllerV2.h; sourceTree = "<group>"; };
|
||||
54F4692E2C280CF100A83655 /* XPMineUserInfoViewControllerV2.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineUserInfoViewControllerV2.m; sourceTree = "<group>"; };
|
||||
54F469332C29711400A83655 /* XPMomentUserDataViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMomentUserDataViewController.h; sourceTree = "<group>"; };
|
||||
54F469342C29711400A83655 /* XPMomentUserDataViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMomentUserDataViewController.m; sourceTree = "<group>"; };
|
||||
54F469362C29C3B400A83655 /* XPMineAlbumTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAlbumTableViewCell.h; sourceTree = "<group>"; };
|
||||
@@ -8977,6 +8986,8 @@
|
||||
9BCD02C62796C02800F396AA /* MicroNobleWaveView.m */,
|
||||
E8DACCF92766EDC60052092C /* MicroGiftValueView.h */,
|
||||
E8DACCFA2766EDC60052092C /* MicroGiftValueView.m */,
|
||||
545831A42C2C085C00364026 /* ArabMicroView.h */,
|
||||
545831A52C2C085C00364026 /* ArabMicroView.m */,
|
||||
);
|
||||
path = MicroView;
|
||||
sourceTree = "<group>";
|
||||
@@ -9718,8 +9729,6 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E88B5CBF26FB407B00DA9178 /* XPMineUserInfoViewController.h */,
|
||||
54F4692D2C280CF100A83655 /* XPMineUserInfoViewControllerV2.h */,
|
||||
54F4692E2C280CF100A83655 /* XPMineUserInfoViewControllerV2.m */,
|
||||
E88B5CC026FB407B00DA9178 /* XPMineUserInfoViewController.m */,
|
||||
E8D34D4528080295009C4835 /* XPMineUserDataViewController.h */,
|
||||
E8D34D4628080295009C4835 /* XPMineUserDataViewController.m */,
|
||||
@@ -10204,6 +10213,8 @@
|
||||
E816C11427608A7500C84014 /* XPRoomMiniManager.m */,
|
||||
E8AEAED4271412EC0017FCE0 /* XPRoomViewController.h */,
|
||||
E8AEAED5271412EC0017FCE0 /* XPRoomViewController.m */,
|
||||
5458319B2C2AE09300364026 /* XPRoomTypeSelectionViewController.h */,
|
||||
5458319C2C2AE09300364026 /* XPRoomTypeSelectionViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -10302,6 +10313,10 @@
|
||||
181D7F1A2726CE2A00B7C059 /* StageView.m */,
|
||||
181D7F1F2727D9DB00B7C059 /* SocialStageView.h */,
|
||||
181D7F202727D9DB00B7C059 /* SocialStageView.m */,
|
||||
5458319E2C2AEFAF00364026 /* TenMicStageView.h */,
|
||||
5458319F2C2AEFAF00364026 /* TenMicStageView.m */,
|
||||
545831A12C2AF01100364026 /* FifteenMicStageView.h */,
|
||||
545831A22C2AF01100364026 /* FifteenMicStageView.m */,
|
||||
E877A7E92783E24700EFACED /* DatingStageView.h */,
|
||||
E877A7EA2783E24700EFACED /* DatingStageView.m */,
|
||||
9B0086C427BA392B0032BD2B /* AnchorStageView.h */,
|
||||
@@ -11426,7 +11441,6 @@
|
||||
2331C1642A5EB71000E1D940 /* NobleInfo.m in Sources */,
|
||||
23E9EB182A84D0E700B792F2 /* XPMineUserInfoEditMainTagView.m in Sources */,
|
||||
E824543A26F5880E00BE8163 /* XPLoginVerifBindPhoneProtocol.h in Sources */,
|
||||
54F4692F2C280CF100A83655 /* XPMineUserInfoViewControllerV2.m in Sources */,
|
||||
E821077E2987D67100DE7040 /* MessageRiskAlertModel.m in Sources */,
|
||||
E818DD222A48977F00F163F7 /* XPLoginAreaTableViewCell.m in Sources */,
|
||||
E81060F72987C8A700B772F0 /* MessageApplicationShareModel.m in Sources */,
|
||||
@@ -11499,6 +11513,7 @@
|
||||
E85E7B282A4EB0D300B6D00A /* XPClanMenuView.m in Sources */,
|
||||
9BE01AF72893E7F500B50299 /* XPNewUserRechargeCollectionViewCell.m in Sources */,
|
||||
E81125C7296E596D000D9804 /* QInputPhototCell.m in Sources */,
|
||||
545831A62C2C085C00364026 /* ArabMicroView.m in Sources */,
|
||||
E8EEB8F726FC2673007C6EBA /* UserPhoto.m in Sources */,
|
||||
E81061002987CDCC00B772F0 /* MessageTweetModel.m in Sources */,
|
||||
E87DF4CC2A42C960009C1185 /* HomeBannerInfoModel.m in Sources */,
|
||||
@@ -11748,6 +11763,7 @@
|
||||
9B32A04728881845002009D2 /* XPRoomTagListView.m in Sources */,
|
||||
E85E7B1D2A4EB0D200B6D00A /* XPMineClanIncomeStatisViewController.m in Sources */,
|
||||
189DD55A26DE39D200AB55B1 /* BaseMvpPresenter.m in Sources */,
|
||||
5458319D2C2AE09300364026 /* XPRoomTypeSelectionViewController.m in Sources */,
|
||||
1427219029A75F6F00C7C423 /* WebSocket.m in Sources */,
|
||||
E83ABEF9280EAF3F00322EE4 /* MessageContentOpenLiveView.m in Sources */,
|
||||
E83ABF06280EDE2B00322EE4 /* MessageContentLevelUpgradeView.m in Sources */,
|
||||
@@ -12234,6 +12250,7 @@
|
||||
E87E62622A3F568A002F68C9 /* XPNewHomeNavView.m in Sources */,
|
||||
18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */,
|
||||
E8AEAEF927141CA30017FCE0 /* RoomHeaderView.m in Sources */,
|
||||
545831A32C2AF01100364026 /* FifteenMicStageView.m in Sources */,
|
||||
E8AB632428AE10310023B0D2 /* XPMoentsTopicListViewController.m in Sources */,
|
||||
E8098CAA282E03B40090B9F0 /* XPMonentsRecommendPresenter.m in Sources */,
|
||||
E8F63CBB298B648300B338BA /* SessionSayHelloListModel.m in Sources */,
|
||||
@@ -12316,6 +12333,7 @@
|
||||
238B37D02AC55A2C00BFC9D5 /* XPTreasureFairySummonGiftView.m in Sources */,
|
||||
14DCAD0E299B6AD900A7DD31 /* XPForgetPwdViewController.m in Sources */,
|
||||
23194DD12AD14BF000649F51 /* DDAbstractDatabaseLogger.m in Sources */,
|
||||
545831A02C2AEFAF00364026 /* TenMicStageView.m in Sources */,
|
||||
9BE9F0FF27FED76500667200 /* XPAnchorFansTaskModel.m in Sources */,
|
||||
E85E7BAA2A4EC99300B6D00A /* XPMineGiveDiamondPwdView.m in Sources */,
|
||||
23FF428E2AAB2D3A0055733C /* XPCandyTreeBuyView.m in Sources */,
|
||||
@@ -12838,7 +12856,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.20.25;
|
||||
MARKETING_VERSION = 20.20.26;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -12876,7 +12894,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.20.25;
|
||||
MARKETING_VERSION = 20.20.26;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
@@ -72,7 +72,7 @@
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
buildConfiguration = "Debug"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
Before Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 125 B |
6
YuMi/Assets.xcassets/RoomType/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
6
YuMi/Assets.xcassets/RoomType/RoomType/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -5,12 +5,11 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_online_mark@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_online_mark@3x.png",
|
||||
"filename" : "示例图@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
YuMi/Assets.xcassets/RoomType/room_type_example_10.imageset/示例图@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 251 KiB |
21
YuMi/Assets.xcassets/RoomType/room_type_example_15.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "示例图@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/RoomType/room_type_example_15.imageset/示例图@3x.png
vendored
Normal file
After Width: | Height: | Size: 273 KiB |
21
YuMi/Assets.xcassets/RoomType/room_type_example_9.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "示例图@3x 2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/RoomType/room_type_example_9.imageset/示例图@3x 2.png
vendored
Normal file
After Width: | Height: | Size: 199 KiB |
22
YuMi/Assets.xcassets/RoomType/room_type_example_mini_10.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "示例图@2x(1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "示例图@3x(1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/RoomType/room_type_example_mini_10.imageset/示例图@2x(1).png
vendored
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
YuMi/Assets.xcassets/RoomType/room_type_example_mini_10.imageset/示例图@3x(1).png
vendored
Normal file
After Width: | Height: | Size: 46 KiB |
22
YuMi/Assets.xcassets/RoomType/room_type_example_mini_15.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "示例图@2x(2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "示例图@3x(2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/RoomType/room_type_example_mini_15.imageset/示例图@2x(2).png
vendored
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
YuMi/Assets.xcassets/RoomType/room_type_example_mini_15.imageset/示例图@3x(2).png
vendored
Normal file
After Width: | Height: | Size: 51 KiB |
22
YuMi/Assets.xcassets/RoomType/room_type_example_mini_9.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "示例图@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "示例图@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/RoomType/room_type_example_mini_9.imageset/示例图@2x.png
vendored
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
YuMi/Assets.xcassets/RoomType/room_type_example_mini_9.imageset/示例图@3x.png
vendored
Normal file
After Width: | Height: | Size: 34 KiB |
22
YuMi/Assets.xcassets/RoomType/room_type_selection_frame.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_type_selection_frame@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_type_selection_frame@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/RoomType/room_type_selection_frame.imageset/room_type_selection_frame@2x.png
vendored
Normal file
After Width: | Height: | Size: 674 B |
BIN
YuMi/Assets.xcassets/RoomType/room_type_selection_frame.imageset/room_type_selection_frame@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
22
YuMi/Assets.xcassets/RoomType/room_type_selection_icon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_type_selection_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_type_selection_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/RoomType/room_type_selection_icon.imageset/room_type_selection_icon@2x.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
YuMi/Assets.xcassets/RoomType/room_type_selection_icon.imageset/room_type_selection_icon@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.9 KiB |
@@ -5,12 +5,12 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "user_card_copy_id1@2x.png",
|
||||
"filename" : "复制@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "user_card_copy_id1@3x.png",
|
||||
"filename" : "复制@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 367 B |
BIN
YuMi/Assets.xcassets/jm/user_card_copy_id1.imageset/复制@2x.png
vendored
Normal file
After Width: | Height: | Size: 271 B |
BIN
YuMi/Assets.xcassets/jm/user_card_copy_id1.imageset/复制@3x.png
vendored
Normal file
After Width: | Height: | Size: 647 B |
22
YuMi/Assets.xcassets/utils/common_down_arrow.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "common_down_arrow@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "common_down_arrow@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/utils/common_down_arrow.imageset/common_down_arrow@2x.png
vendored
Normal file
After Width: | Height: | Size: 247 B |
BIN
YuMi/Assets.xcassets/utils/common_down_arrow.imageset/common_down_arrow@3x.png
vendored
Normal file
After Width: | Height: | Size: 531 B |
22
YuMi/Assets.xcassets/utils/common_empty_UFO.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "common_empty_UFO@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "common_empty_UFO@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/utils/common_empty_UFO.imageset/common_empty_UFO@2x.png
vendored
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
YuMi/Assets.xcassets/utils/common_empty_UFO.imageset/common_empty_UFO@3x.png
vendored
Normal file
After Width: | Height: | Size: 13 KiB |
22
YuMi/Assets.xcassets/utils/user_info_id_beatiful_mark.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "user_info_id_mark@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "user_info_id_mark@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/utils/user_info_id_beatiful_mark.imageset/user_info_id_mark@2x.png
vendored
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
YuMi/Assets.xcassets/utils/user_info_id_beatiful_mark.imageset/user_info_id_mark@3x.png
vendored
Normal file
After Width: | Height: | Size: 14 KiB |
22
YuMi/Assets.xcassets/utils/user_info_id_mark.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "user_info_id_mark@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "user_info_id_mark@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/utils/user_info_id_mark.imageset/user_info_id_mark@2x.png
vendored
Normal file
After Width: | Height: | Size: 484 B |
BIN
YuMi/Assets.xcassets/utils/user_info_id_mark.imageset/user_info_id_mark@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
22
YuMi/Assets.xcassets/yna/Menu/room_menu_more_red.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_more_red@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_menu_more_red@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_more_red.imageset/room_menu_more_red@2x.png
vendored
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
YuMi/Assets.xcassets/yna/Menu/room_menu_more_red.imageset/room_menu_more_red@3x.png
vendored
Normal file
After Width: | Height: | Size: 6.7 KiB |
22
YuMi/Assets.xcassets/yna/room_header_topic_icon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_header_topic_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_header_topic_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/yna/room_header_topic_icon.imageset/room_header_topic_icon@2x.png
vendored
Normal file
After Width: | Height: | Size: 707 B |
BIN
YuMi/Assets.xcassets/yna/room_header_topic_icon.imageset/room_header_topic_icon@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
@@ -40,6 +40,7 @@ typedef NS_ENUM(NSUInteger, ImageType){
|
||||
+ (UIImage *)defaultEmptyAvatarPlaceholder;
|
||||
/// 空白图的占位图
|
||||
+ (UIImage *)defaultEmptyPlaceholder;
|
||||
+ (UIImage *)defaultEmptyPlaceholder_UFO;
|
||||
/// banner的占位图
|
||||
+ (UIImage *)defaultBannerPlaceholder;
|
||||
|
||||
|
@@ -44,6 +44,11 @@ NSString * const kImageTypeMonentsPhoto = @"imageMogr2/auto-orient/thumbnail/400
|
||||
return [UIImage imageNamed:@"common_banner"];
|
||||
}
|
||||
|
||||
+ (UIImage *)defaultEmptyPlaceholder_UFO {
|
||||
return [UIImage imageNamed:@"common_empty_UFO"];
|
||||
}
|
||||
|
||||
|
||||
+ (NSString *)configUrl:(NSString *)url type:(ImageType)type {
|
||||
return [self configUrl:url type:type radius:0];
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
|
||||
|
||||
|
||||
///内置版本号
|
||||
#define PI_App_Version @"1.0.11"
|
||||
#define PI_App_Version @"1.0.12"
|
||||
///渠道
|
||||
#define PI_App_Source @"appstore"
|
||||
#define PI_Test_Flight @"TestFlight"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>MoliStar</string>
|
||||
<string>MoliStar Debug</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "XPMineAlbumTableViewCell.h"
|
||||
#import "UserPhoto.h"
|
||||
#import "SDPhotoBrowser.h"
|
||||
|
||||
@interface XPMineAlbumCell : UICollectionViewCell
|
||||
|
||||
@@ -25,6 +26,7 @@
|
||||
_imageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_imageView.layer.masksToBounds = YES;
|
||||
_imageView.layer.cornerRadius = 12;
|
||||
_imageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
|
||||
[self.contentView addSubview:_imageView];
|
||||
[_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -37,7 +39,7 @@
|
||||
@end
|
||||
|
||||
|
||||
@interface XPMineAlbumTableViewCell() <UICollectionViewDelegateFlowLayout, UICollectionViewDataSource>
|
||||
@interface XPMineAlbumTableViewCell() <UICollectionViewDelegateFlowLayout, UICollectionViewDataSource, SDPhotoBrowserDelegate>
|
||||
|
||||
@property (nonatomic, strong) UICollectionView *albumCollectionView;
|
||||
@property (nonatomic, strong) UILabel *noDataLabel;
|
||||
@@ -51,7 +53,7 @@
|
||||
self.contentView.backgroundColor = [UIColor whiteColor];
|
||||
[self.contentView addSubview:self.albumCollectionView];
|
||||
[self.albumCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView).offset(14);
|
||||
make.left.mas_equalTo(self.contentView).offset(8);
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
@@ -89,12 +91,36 @@
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView
|
||||
didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
SDPhotoBrowser *browser = [[SDPhotoBrowser alloc]init];
|
||||
browser.sourceImagesContainerView = self.albumCollectionView;
|
||||
browser.delegate = self;
|
||||
browser.imageCount = self.albumDataSource.count;
|
||||
browser.currentImageIndex = indexPath.item - 1;
|
||||
browser.isHaveUserAdd = YES;
|
||||
[browser show];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegateFlowLayout
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return CGSizeMake(80, 80);
|
||||
}
|
||||
|
||||
#pragma mark - SDPhotoBrowserDelegate
|
||||
- (UIImage *)photoBrowser:(SDPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index {
|
||||
return [UIImageConstant defaultAvatarPlaceholder];
|
||||
}
|
||||
|
||||
- (NSURL *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index {
|
||||
UserPhoto *photo = [self.albumDataSource xpSafeObjectAtIndex:index];
|
||||
if (photo) {
|
||||
return [NSURL URLWithString:photo.photoUrl];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (UICollectionView *)albumCollectionView {
|
||||
if (!_albumCollectionView) {
|
||||
@@ -115,7 +141,7 @@
|
||||
|
||||
- (UILabel *)noDataLabel {
|
||||
if (!_noDataLabel) {
|
||||
_noDataLabel = [UILabel labelInitWithText:@"暂无照片" font:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0x191919)];
|
||||
_noDataLabel = [UILabel labelInitWithText:YMLocalizedString(@"XPMineUserInfoGiftWallViewController3") font:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0x191919)];
|
||||
_noDataLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_noDataLabel.alpha = 0.5;
|
||||
_noDataLabel.hidden = YES;
|
||||
|
@@ -172,7 +172,7 @@
|
||||
|
||||
+ (CGFloat)cellHeight:(BOOL)isExpand source:(NSArray *)dataSource {
|
||||
if (isExpand) {
|
||||
NSInteger line = dataSource.count / 4;
|
||||
NSInteger line = (dataSource.count / 4) + (dataSource.count % 4 > 0 ? 1 : 0);
|
||||
return MAX(line * 120 + line * 10, 120);
|
||||
} else {
|
||||
return 120;
|
||||
@@ -226,7 +226,7 @@
|
||||
|
||||
- (UILabel *)noDataLabel {
|
||||
if (!_noDataLabel) {
|
||||
_noDataLabel = [UILabel labelInitWithText:@"暂无礼物" font:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0x191919)];
|
||||
_noDataLabel = [UILabel labelInitWithText:YMLocalizedString(@"XPMineUserInfoGiftWallViewController4") font:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0x191919)];
|
||||
_noDataLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_noDataLabel.alpha = 0.5;
|
||||
_noDataLabel.hidden = YES;
|
||||
|
@@ -50,7 +50,7 @@
|
||||
self.contentView.backgroundColor = [UIColor whiteColor];
|
||||
[self.contentView addSubview:self.medalsCollectionView];
|
||||
[self.medalsCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView).offset(14);
|
||||
make.left.mas_equalTo(self.contentView).offset(8);
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
- (UILabel *)noDataLabel {
|
||||
if (!_noDataLabel) {
|
||||
_noDataLabel = [UILabel labelInitWithText:@"暂无勋章" font:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0x191919)];
|
||||
_noDataLabel = [UILabel labelInitWithText:YMLocalizedString(@"XPMineDataGiftTableViewCell2") font:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0x191919)];
|
||||
_noDataLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_noDataLabel.alpha = 0.5;
|
||||
_noDataLabel.hidden = YES;
|
||||
|
@@ -74,7 +74,11 @@ typedef enum : NSUInteger {
|
||||
[self addSubview:_titleLabel];
|
||||
[_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.left.mas_equalTo(self).offset(16);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self).offset(0);
|
||||
} else {
|
||||
make.left.mas_equalTo(self).offset(0);
|
||||
}
|
||||
}];
|
||||
|
||||
_numLabel = [UILabel labelInitWithText:@""
|
||||
@@ -83,12 +87,24 @@ typedef enum : NSUInteger {
|
||||
[self addSubview:_numLabel];
|
||||
[_numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.left.mas_equalTo(self.titleLabel.mas_right).offset(4);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.titleLabel.mas_left).offset(-4);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.titleLabel.mas_right).offset(4);
|
||||
}
|
||||
}];
|
||||
|
||||
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_arrowButton setBackgroundImage:[UIImage imageNamed:@"skillCard_arrow"]
|
||||
forState:UIControlStateNormal];
|
||||
if (isMSRTL()) {
|
||||
_arrowButton.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
|
||||
}
|
||||
if (isMSRTL()) {
|
||||
[_arrowButton setBackgroundImage:[[UIImage imageNamed:@"skillCard_arrow"] ms_SetImageForRTL]
|
||||
forState:UIControlStateNormal];
|
||||
} else {
|
||||
[_arrowButton setBackgroundImage:[UIImage imageNamed:@"skillCard_arrow"]
|
||||
forState:UIControlStateNormal];
|
||||
}
|
||||
[_arrowButton addTarget:self
|
||||
action:@selector(didTapArrowButton)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
@@ -96,8 +112,12 @@ typedef enum : NSUInteger {
|
||||
[self addSubview:_arrowButton];
|
||||
[_arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.right.mas_equalTo(self).offset(-16);
|
||||
make.size.mas_equalTo(CGSizeMake(10, 10));
|
||||
make.size.mas_equalTo(CGSizeMake(20, 20));
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(self).offset(0);
|
||||
} else {
|
||||
make.right.mas_equalTo(self).offset(0);
|
||||
}
|
||||
}];
|
||||
}
|
||||
return self;
|
||||
@@ -214,7 +234,7 @@ typedef enum : NSUInteger {
|
||||
return 1;
|
||||
break;
|
||||
case Medal:
|
||||
return 1;
|
||||
return self.medalInfo.medalCount == 0 ? 0 : 1;
|
||||
break;
|
||||
case Gifts:
|
||||
return 1;
|
||||
@@ -260,10 +280,10 @@ typedef enum : NSUInteger {
|
||||
return nil;
|
||||
break;
|
||||
case Gifts:
|
||||
return self.giftsExpandButton;
|
||||
return self.giftWall.count > 4 ? self.giftsExpandButton : nil;
|
||||
break;
|
||||
case LuckyGifts:
|
||||
return self.luckyGiftsExpandButton;
|
||||
return self.luckyGiftWall.count > 4 ? self.luckyGiftsExpandButton : nil;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
@@ -279,10 +299,10 @@ typedef enum : NSUInteger {
|
||||
return 0;
|
||||
break;
|
||||
case Gifts:
|
||||
return 20;
|
||||
return self.giftWall.count > 4 ? 20 : 0;
|
||||
break;
|
||||
case LuckyGifts:
|
||||
return 20;
|
||||
return self.luckyGiftWall.count > 4 ? 20 : 0;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
@@ -290,6 +310,9 @@ typedef enum : NSUInteger {
|
||||
}
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
if (section == Medal) {
|
||||
return self.medalInfo.medalCount == 0 ? 0 : 30;
|
||||
}
|
||||
return 30;
|
||||
}
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
@@ -298,7 +321,7 @@ typedef enum : NSUInteger {
|
||||
return self.albumHeader;
|
||||
break;
|
||||
case Medal:
|
||||
return self.medalHeader;
|
||||
return self.medalInfo.medalCount == 0 ? [UIView new] : self.medalHeader;
|
||||
break;
|
||||
case Gifts:
|
||||
return self.giftsHeader;
|
||||
@@ -388,12 +411,8 @@ typedef enum : NSUInteger {
|
||||
}];
|
||||
}
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicShielding:(nonnull MonentsInfoModel *)monentsInfo{
|
||||
|
||||
|
||||
[self showLoading];
|
||||
[self.presenter requesstShieldingWtihType:@"0" objId:monentsInfo.dynamicId];
|
||||
|
||||
|
||||
}
|
||||
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicFold:(MonentsInfoModel *)monentsInfo {
|
||||
__block MonentsInfoModel * monentsInfos;
|
||||
@@ -547,6 +566,10 @@ typedef enum : NSUInteger {
|
||||
_userInfo = userInfo;
|
||||
self.albumHeader.num = [NSString stringWithFormat:@"(%ld)", (long)userInfo.privatePhoto.count];
|
||||
[self.tableView reloadData];
|
||||
|
||||
if (userInfo.uid != [[AccountInfoStorage instance].getUid integerValue]) {
|
||||
self.albumHeader.hasMore = NO;
|
||||
}
|
||||
}
|
||||
- (void)setDynamicInfo:(NSArray<MonentsInfoModel *> *)dynamicInfo {
|
||||
[self.datasource removeAllObjects];
|
||||
@@ -580,6 +603,9 @@ typedef enum : NSUInteger {
|
||||
[_tableView registerClass:[XPMonentsTableViewCell class] forCellReuseIdentifier:@"XPMonentsDynamicTableViewCell"];
|
||||
[_tableView registerClass:[XPMineDataClanTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDataClanTableViewCell class])];
|
||||
[_tableView registerClass:[XPMineDataGiftTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDataGiftTableViewCell class])];
|
||||
if (isMSRTL()) {
|
||||
_tableView.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
|
||||
}
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
@@ -594,7 +620,7 @@ typedef enum : NSUInteger {
|
||||
- (XPMineUserSectionHeader *)albumHeader {
|
||||
if (!_albumHeader) {
|
||||
_albumHeader = [[XPMineUserSectionHeader alloc] init];
|
||||
_albumHeader.title = @"相册";
|
||||
_albumHeader.title = YMLocalizedString(@"QinputPhotoView1");
|
||||
_albumHeader.hasMore = YES;
|
||||
@kWeakify(self);
|
||||
_albumHeader.didTapMore = ^{
|
||||
@@ -609,7 +635,7 @@ typedef enum : NSUInteger {
|
||||
- (XPMineUserSectionHeader *)medalHeader {
|
||||
if (!_medalHeader) {
|
||||
_medalHeader = [[XPMineUserSectionHeader alloc] init];
|
||||
_medalHeader.title = @"勋章";
|
||||
_medalHeader.title = YMLocalizedString(@"XPMineDataGiftTableViewCell2");
|
||||
_medalHeader.num = @"(0)";
|
||||
_medalHeader.hasMore = NO;
|
||||
}
|
||||
@@ -619,7 +645,7 @@ typedef enum : NSUInteger {
|
||||
- (XPMineUserSectionHeader *)giftsHeader {
|
||||
if (!_giftsHeader) {
|
||||
_giftsHeader = [[XPMineUserSectionHeader alloc] init];
|
||||
_giftsHeader.title = @"普通礼物";
|
||||
_giftsHeader.title = YMLocalizedString(@"XPMineDataGiftTableViewCell0");
|
||||
_giftsHeader.hasMore = NO;
|
||||
}
|
||||
return _giftsHeader;
|
||||
@@ -628,7 +654,7 @@ typedef enum : NSUInteger {
|
||||
- (XPMineUserSectionHeader *)luckyGiftsHeader {
|
||||
if (!_luckyGiftsHeader) {
|
||||
_luckyGiftsHeader = [[XPMineUserSectionHeader alloc] init];
|
||||
_luckyGiftsHeader.title = @"幸运礼物";
|
||||
_luckyGiftsHeader.title = YMLocalizedString(@"XPMineDataGiftTableViewCell1");
|
||||
_luckyGiftsHeader.hasMore = NO;
|
||||
}
|
||||
return _luckyGiftsHeader;
|
||||
@@ -637,7 +663,7 @@ typedef enum : NSUInteger {
|
||||
- (UIButton *)giftsExpandButton {
|
||||
if (!_giftsExpandButton) {
|
||||
_giftsExpandButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_giftsExpandButton setImage:[UIImage imageNamed:@"gift_bar_count_arrow"] forState:UIControlStateNormal];
|
||||
[_giftsExpandButton setImage:[UIImage imageNamed:@"common_down_arrow"] forState:UIControlStateNormal];
|
||||
[_giftsExpandButton addTarget:self action:@selector(didTapGiftsSectionFoldButton) forControlEvents:UIControlEventTouchUpInside];
|
||||
_giftsExpandButton.selected = YES;
|
||||
[_giftsExpandButton setEnlargeEdgeWithTop:5 right:10 bottom:10 left:10];
|
||||
@@ -648,7 +674,7 @@ typedef enum : NSUInteger {
|
||||
- (UIButton *)luckyGiftsExpandButton {
|
||||
if (!_luckyGiftsExpandButton) {
|
||||
_luckyGiftsExpandButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_luckyGiftsExpandButton setImage:[UIImage imageNamed:@"gift_bar_count_arrow"] forState:UIControlStateNormal];
|
||||
[_luckyGiftsExpandButton setImage:[UIImage imageNamed:@"common_down_arrow"] forState:UIControlStateNormal];
|
||||
[_luckyGiftsExpandButton addTarget:self action:@selector(didTapLuckyGiftsSectionFoldButton) forControlEvents:UIControlEventTouchUpInside];
|
||||
_luckyGiftsExpandButton.selected = YES;
|
||||
[_luckyGiftsExpandButton setEnlargeEdgeWithTop:5 right:10 bottom:10 left:10];
|
||||
|
@@ -122,6 +122,7 @@
|
||||
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
|
||||
if ([[UIApplication sharedApplication] canOpenURL:url]) {
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
// [[UIApplication sharedApplication] openURL:url options:nil completionHandler:nil];
|
||||
}
|
||||
} cancelHandler:^{
|
||||
}];
|
||||
@@ -192,13 +193,16 @@
|
||||
#pragma mark - UIImagePickerControllerDelegate
|
||||
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
|
||||
|
||||
@kWeakify(self);
|
||||
[picker dismissViewControllerAnimated:YES completion:^{
|
||||
@kStrongify(self);
|
||||
UIImage *selectedPhoto = [info objectForKey:UIImagePickerControllerOriginalImage];
|
||||
if (selectedPhoto) {
|
||||
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
|
||||
UIImageWriteToSavedPhotosAlbum(selectedPhoto, nil, nil, nil);
|
||||
}
|
||||
[self.presenter uploadAlbumImage:selectedPhoto];
|
||||
[self showLoading];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ static NSInteger maxCount = 60;
|
||||
self.limitLabel.text = @"0";
|
||||
}
|
||||
|
||||
return @(text.length > 0 && text.length <= maxCount);
|
||||
return @(text.length > 0 && text.length <= maxCount+1);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Event Response
|
||||
|
@@ -123,7 +123,11 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
|
||||
- (void)viewDidLayoutSubviews {
|
||||
[super viewDidLayoutSubviews];
|
||||
self.pagingView.frame = self.view.bounds;
|
||||
if (self.uid == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
self.pagingView.frame = self.view.bounds;
|
||||
} else {
|
||||
self.pagingView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - 45 - kSafeAreaBottomHeight - 15);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
@@ -132,9 +136,8 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
[self.view addSubview:self.navView];
|
||||
if (self.uid != [AccountInfoStorage instance].getUid.integerValue) {
|
||||
[self.view addSubview:self.bottomStackView];
|
||||
[self.bottomStackView addArrangedSubview:self.chatButton];
|
||||
[self.bottomStackView addArrangedSubview:self.attentionButton];
|
||||
|
||||
[self.bottomStackView addArrangedSubview:self.chatButton];
|
||||
[self.bottomStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.mas_equalTo(self.view).inset(15);
|
||||
make.height.mas_equalTo(45);
|
||||
@@ -230,7 +233,7 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView {
|
||||
return 500; //358;
|
||||
return [XPMineUserInfoHeaderView headerHeight:self.userInfo]; //500; //358;
|
||||
}
|
||||
|
||||
- (UIView *)tableHeaderViewInPagerView:(JXPagerView *)pagerView {
|
||||
@@ -255,13 +258,11 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
return self.userDataVC;
|
||||
}
|
||||
return self.userMomentVC;
|
||||
// return self.giftVC;
|
||||
}
|
||||
if (index == 0) {
|
||||
return self.userDataVC;
|
||||
}
|
||||
return self.userMomentVC;
|
||||
// return self.giftVC;
|
||||
}
|
||||
|
||||
#pragma mark - JXPagerMainTableViewGestureDelegate
|
||||
@@ -309,12 +310,10 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
|
||||
#pragma mark - XPMineUserInfoIndividualTagView
|
||||
- (void)didClickGotoEditVC{
|
||||
|
||||
XPMineUserInfoTagVC *tagVC =[XPMineUserInfoTagVC new];
|
||||
tagVC.tagModel = self.tagModel;
|
||||
tagVC.delegate = self;
|
||||
[self.navigationController pushViewController:tagVC animated:YES];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark- XPMineUserInfoTagVCDelegate
|
||||
@@ -333,8 +332,12 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
self.headView.tagModel = tagModel;
|
||||
self.userDataVC.userInfo = userInfo;
|
||||
if(isMSRTL()){
|
||||
[self.titleView selectItemAtIndex:1];
|
||||
[self.titleView selectItemAtIndex:0];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.titleView selectItemAtIndex:0];
|
||||
});
|
||||
}
|
||||
[self.pagingView reloadData];
|
||||
}
|
||||
|
||||
- (void)ongetDetailInfoSuccess:(UserInfoModel *)userInfo {
|
||||
@@ -346,6 +349,13 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
self.headView.roomUid = userInfo.roomUid;
|
||||
self.giftVC.userInfo = userInfo;
|
||||
|
||||
if(isMSRTL()){
|
||||
[self.titleView selectItemAtIndex:1];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.titleView selectItemAtIndex:0];
|
||||
});
|
||||
}
|
||||
[self.pagingView reloadData];
|
||||
}
|
||||
|
||||
- (void)getAttentionStateSuccess:(BOOL)status {
|
||||
@@ -410,6 +420,7 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
if (!_navView) {
|
||||
_navView = [[XPMineUserInfoCustomNavView alloc] init];
|
||||
_navView.delegate = self;
|
||||
[_navView updateBackButtonImage:[UIImage imageNamed:@"home_search_white_back"]];
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
@@ -469,23 +480,24 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
_titleView.titleColor = UIColorRGBAlpha(0x191919, 0.5);
|
||||
_titleView.titleSelectedColor = UIColorFromRGB(0x191919);
|
||||
_titleView.titleFont = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:20 weight:UIFontWeightBold];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.averageCellSpacingEnabled = NO;
|
||||
_titleView.contentEdgeInsetLeft = 20;
|
||||
_titleView.contentEdgeInsetLeft = 15;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.cellSpacing = 20;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.listContainer = (id<JXCategoryViewListContainer>)self.pagingView.listContainerView;
|
||||
|
||||
JXCategoryIndicatorImageView *lineView = [[JXCategoryIndicatorImageView alloc] init];
|
||||
lineView.indicatorImageViewSize = CGSizeMake(37, 8);
|
||||
lineView.verticalMargin = 15;
|
||||
lineView.verticalMargin = 8;
|
||||
lineView.indicatorImageView.layer.masksToBounds = YES;
|
||||
lineView.indicatorImageView.layer.cornerRadius = 3;
|
||||
lineView.indicatorImageView.image = [UIImage imageNamed:@"mine_dynamic"];
|
||||
lineView.indicatorImageView.layer.cornerRadius = 1.5;
|
||||
lineView.indicatorImageView.image = [UIImage imageWithColor:UIColorFromRGB(0x26cc9c)];
|
||||
lineView.indicatorImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
lineView.indicatorImageViewSize = CGSizeMake(18, 3);
|
||||
_titleView.indicators = @[lineView];
|
||||
}
|
||||
return _titleView;
|
||||
@@ -498,6 +510,7 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
_pagingView.listContainerView.backgroundColor = [UIColor clearColor];
|
||||
_pagingView.mainTableView.backgroundColor = [UIColor clearColor];
|
||||
_pagingView.listContainerView.listCellBackgroundColor = UIColor.clearColor;
|
||||
_pagingView.listContainerView.scrollView.bounces = NO;
|
||||
_pagingView.mainTableView.gestureDelegate = self;
|
||||
}
|
||||
return _pagingView;
|
||||
@@ -506,8 +519,7 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
- (NSArray<NSString *> *)titles {
|
||||
if (!_titles) {
|
||||
_titles = @[YMLocalizedString(@"XPMineUserInfoViewController11"),
|
||||
@"动态"
|
||||
// YMLocalizedString(@"XPMineUserInfoViewController13")
|
||||
YMLocalizedString(@"XPMineUserInfoViewController12")
|
||||
];
|
||||
}
|
||||
return _titles;
|
||||
@@ -516,7 +528,7 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
- (XPMineUserDataViewController *)userDataVC {
|
||||
if (!_userDataVC) {
|
||||
_userDataVC = [[XPMineUserDataViewController alloc] init];
|
||||
_userDataVC.delegate = self;
|
||||
// _userDataVC.delegate = self;
|
||||
}
|
||||
return _userDataVC;
|
||||
}
|
||||
|
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// XPMineUserInfoViewControllerV2.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/23.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineUserInfoViewControllerV2 : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,43 +0,0 @@
|
||||
//
|
||||
// XPMineUserInfoViewControllerV2.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/23.
|
||||
//
|
||||
|
||||
#import "XPMineUserInfoViewControllerV2.h"
|
||||
#import "XPMineUserInfoPresenter.h"
|
||||
|
||||
@interface XPMineUserInfoViewControllerV2 ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineUserInfoViewControllerV2
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
}
|
||||
|
||||
- (XPMineUserInfoPresenter *)createPresenter {
|
||||
return [[XPMineUserInfoPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
@@ -22,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong,readonly) UILabel *titleLabel;
|
||||
///编辑按钮
|
||||
@property (nonatomic,strong,readonly) UIButton *editButton;
|
||||
|
||||
- (void)updateBackButtonImage:(UIImage *)image;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -31,6 +31,14 @@
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)updateBackButtonImage:(UIImage *)image {
|
||||
if (image) {
|
||||
[self.backButton setImage:[image ms_SetImageForRTL]
|
||||
forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Response
|
||||
- (void)editButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineCustomNavView:didClickEditButton:)]) {
|
||||
|
@@ -189,8 +189,18 @@
|
||||
//数据源
|
||||
-(NSMutableArray *)dataSourceArray{
|
||||
if(!_dataSourceArray){
|
||||
// 获取当前日期
|
||||
NSDate *currentDate = [NSDate date];
|
||||
|
||||
// 创建日历对象
|
||||
NSCalendar *calendar = [NSCalendar currentCalendar];
|
||||
|
||||
// 获取年、月、日组件
|
||||
NSDateComponents *components = [calendar components:(NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay) fromDate:currentDate];
|
||||
|
||||
NSInteger year = [components year];
|
||||
NSMutableArray * yearArr = [@[]mutableCopy];
|
||||
for (int i = 1900; i < 2050; i++) {
|
||||
for (int i = 1900; i <= year; i++) {
|
||||
[yearArr addObject:@(i).stringValue];
|
||||
}
|
||||
NSArray * monthArr = @[@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12"];
|
||||
|
@@ -39,6 +39,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
///当前查看用户是否在直播
|
||||
@property (nonatomic,copy) NSString *roomUid;
|
||||
|
||||
+ (CGFloat)headerHeight:(UserInfoModel *)model;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -50,7 +50,7 @@ return view;\
|
||||
///图片数组
|
||||
@property (nonatomic,strong) NSArray *imageUrls;
|
||||
///用户的头像和相册
|
||||
@property (nonatomic,strong) NSMutableArray<UserPhoto *> *userPhtotArray;
|
||||
@property (nonatomic,strong) NSMutableArray<UserPhoto *> *userPhotoArray;
|
||||
///用户信息
|
||||
@property (nonatomic,strong) UIView * userInfoView;
|
||||
|
||||
@@ -62,12 +62,12 @@ return view;\
|
||||
///sex
|
||||
@property (nonatomic,strong) UIButton *sexImageView;
|
||||
|
||||
///正在直播父图
|
||||
@property (nonatomic,strong) UIImageView *onlineView;
|
||||
/////正在直播父图
|
||||
//@property (nonatomic,strong) UIImageView *onlineView;
|
||||
///正在直播icon图
|
||||
@property (nonatomic,strong) SVGAImageView *onlineIconView;
|
||||
///正在直播中tilte
|
||||
@property (nonatomic,strong) UILabel *onlineTitleView;
|
||||
/////正在直播中tilte
|
||||
//@property (nonatomic,strong) UILabel *onlineTitleView;
|
||||
///正在直播中
|
||||
@property (nonatomic,strong) UIButton *onlineButton;
|
||||
///
|
||||
@@ -76,6 +76,8 @@ return view;\
|
||||
@property (nonatomic,strong) UIImageView *beautifulImageView;
|
||||
///id
|
||||
@property (nonatomic,strong) UILabel *idLabel;
|
||||
///
|
||||
@property (nonatomic, strong) UIImageView *copyIdImageView;
|
||||
|
||||
///魅力等级 等级 铭牌
|
||||
@property (nonatomic,strong) UIStackView *tagStackView;
|
||||
@@ -95,7 +97,7 @@ return view;\
|
||||
///新用户
|
||||
@property (nonatomic,strong) UIImageView *newUserImageView;
|
||||
///官方的
|
||||
@property (nonatomic,strong) UIImageView *officalImageView;
|
||||
@property (nonatomic,strong) UIImageView *officialImageView;
|
||||
|
||||
///标签跟签名容器
|
||||
@property (nonatomic,strong) UIStackView *singStackView;
|
||||
@@ -122,7 +124,6 @@ return view;\
|
||||
|
||||
@property (nonatomic, strong) UIStackView *locateDateStackView;
|
||||
@property (nonatomic, strong) UILabel *locateLabel;
|
||||
@property (nonatomic, strong) UILabel *birthDateLabel;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *relationshipView;
|
||||
@property (nonatomic, strong) UILabel *fansNum;
|
||||
@@ -142,8 +143,38 @@ return view;\
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (CGFloat)headerHeight:(UserInfoModel *)model {
|
||||
if (model.userDesc.length == 0) {
|
||||
return 500;
|
||||
} else {
|
||||
// 限定宽度
|
||||
CGFloat maxWidth = KScreenWidth - 70;
|
||||
UIFont *font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
// 设置计算属性
|
||||
NSDictionary *attributes = @{NSFontAttributeName:font};
|
||||
|
||||
// 计算文本的矩形区域
|
||||
CGRect textRect = [model.userDesc boundingRectWithSize:CGSizeMake(maxWidth, CGFLOAT_MAX)
|
||||
options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading
|
||||
attributes:attributes
|
||||
context:nil];
|
||||
|
||||
// 计算每行的高度
|
||||
CGFloat lineHeight = font.lineHeight;
|
||||
|
||||
// 计算行数
|
||||
NSInteger numberOfLines = ceil(textRect.size.height / lineHeight);
|
||||
if (numberOfLines>1) {
|
||||
return 520;
|
||||
}
|
||||
}
|
||||
return 500;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)setupUI {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
|
||||
[self addSubview:self.pi_cycleScrollView];
|
||||
[self.pi_cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.top.mas_equalTo(self);
|
||||
@@ -152,9 +183,33 @@ return view;\
|
||||
|
||||
[self addSubview:self.onlineButton];
|
||||
[self.onlineButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self);
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(self).offset(-10);
|
||||
} else {
|
||||
make.right.mas_equalTo(self).offset(10);
|
||||
}
|
||||
make.top.mas_equalTo(self).offset(104);
|
||||
make.size.mas_equalTo(CGSizeMake(63, 23));
|
||||
make.height.mas_equalTo(24);
|
||||
}];
|
||||
|
||||
[self.onlineButton addSubview:self.onlineIconView];
|
||||
[self.onlineIconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(4);
|
||||
make.centerY.mas_equalTo(0);
|
||||
make.width.mas_equalTo(12);
|
||||
make.height.mas_equalTo(12);
|
||||
}];
|
||||
|
||||
@kWeakify(self);
|
||||
SVGAParser * parser = [[SVGAParser alloc]init];
|
||||
[parser parseWithNamed:@"pi_new_mine_info_online" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
self.onlineIconView.loops = 0;
|
||||
self.onlineIconView.clearsAfterStop = NO;
|
||||
self.onlineIconView.videoItem = videoItem;
|
||||
[self.onlineIconView startAnimation];
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
|
||||
[self addSubview:self.pageButton];
|
||||
@@ -171,19 +226,21 @@ return view;\
|
||||
make.bottom.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.userInfoView addSubview:self.avatarView];
|
||||
[self addSubview:self.avatarView];
|
||||
[self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(72));
|
||||
make.centerX.mas_equalTo(0);
|
||||
make.centerY.equalTo(self.userInfoView.mas_top);
|
||||
}];
|
||||
|
||||
[self.userInfoView addSubview:self.headWearImageView];
|
||||
[self addSubview:self.headWearImageView];
|
||||
[self.headWearImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.mas_equalTo(self.avatarView);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(88));
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(92));
|
||||
}];
|
||||
|
||||
[self addSubview:self.reviewIcon];
|
||||
|
||||
[self setupNameArea];
|
||||
|
||||
[self setupIDArea];
|
||||
@@ -199,12 +256,19 @@ return view;\
|
||||
|
||||
- (void)setupNameArea {
|
||||
[self.userInfoView addSubview:self.nickStackView];
|
||||
[self.nickStackView addArrangedSubview:self.nobleImageView];
|
||||
[self.nickStackView addArrangedSubview:self.nameLabel];
|
||||
[self.nickStackView addArrangedSubview:self.sexImageView];
|
||||
|
||||
[self.nickStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.mas_equalTo(self.userInfoView);
|
||||
make.centerX.mas_equalTo(self.userInfoView);
|
||||
make.top.mas_equalTo(self.avatarView.mas_bottom).offset(18);
|
||||
make.height.mas_equalTo(25);
|
||||
}];
|
||||
|
||||
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(25);
|
||||
make.width.mas_equalTo(10);
|
||||
}];
|
||||
[self.nobleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(20);
|
||||
@@ -212,29 +276,46 @@ return view;\
|
||||
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(28, 14));
|
||||
}];
|
||||
// [self.nickStackView addArrangedSubview:StackSpring(UILayoutConstraintAxisHorizontal)];
|
||||
[self.nickStackView addArrangedSubview:self.nobleImageView];
|
||||
[self.nickStackView addArrangedSubview:self.nameLabel];
|
||||
[self.nickStackView addArrangedSubview:self.sexImageView];
|
||||
// [self.nickStackView addArrangedSubview:StackSpring(UILayoutConstraintAxisHorizontal)];
|
||||
}
|
||||
|
||||
- (void)setupIDArea {
|
||||
|
||||
[self.userInfoView addSubview:self.idStackView];
|
||||
[self.idStackView addArrangedSubview:self.idLabel];
|
||||
[self.idStackView addSubview:self.copyIdImageView];
|
||||
[self.idStackView insertSubview:self.beautifulImageView belowSubview:self.idLabel];
|
||||
|
||||
[self.idStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.mas_equalTo(self.userInfoView);
|
||||
if (isMSRTL()) {
|
||||
make.centerX.mas_equalTo(self.userInfoView).offset(8);
|
||||
} else {
|
||||
make.centerX.mas_equalTo(self.userInfoView);
|
||||
}
|
||||
make.top.mas_equalTo(self.nickStackView.mas_bottom).offset(4);
|
||||
}];
|
||||
[self.beautifulImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(12, 15));
|
||||
make.height.mas_equalTo(23.5);
|
||||
make.left.mas_equalTo(self.idLabel).offset(-24);
|
||||
make.right.mas_equalTo(self.idLabel).offset(8);
|
||||
make.centerY.mas_equalTo(self.idLabel);
|
||||
if (isMSRTL()) {
|
||||
// make.centerX.mas_equalTo(self.idLabel).offset(-8);
|
||||
} else {
|
||||
make.centerX.mas_equalTo(self.idLabel).offset(-10);
|
||||
}
|
||||
}];
|
||||
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
[self.idStackView addArrangedSubview:[UIView new]];
|
||||
[self.idStackView addArrangedSubview:self.beautifulImageView];
|
||||
[self.idStackView addArrangedSubview:self.idLabel];
|
||||
[self.idStackView addArrangedSubview:[UIView new]];
|
||||
[self.copyIdImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(13.4, 13.4));
|
||||
make.centerY.mas_equalTo(self.idLabel);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.idLabel.mas_right).offset(8);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setupLocateArea {
|
||||
@@ -246,29 +327,46 @@ return view;\
|
||||
[self.locateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(16);
|
||||
}];
|
||||
[self.birthDateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(16);
|
||||
}];
|
||||
UILabel *line = [UILabel labelInitWithText:@"|"
|
||||
font:self.locateLabel.font
|
||||
textColor:self.locateLabel.textColor];
|
||||
[self.locateDateStackView addArrangedSubview:StackSpring(UILayoutConstraintAxisHorizontal)];
|
||||
[self.locateDateStackView addArrangedSubview:[self stackSpaceView]];
|
||||
[self.locateDateStackView addArrangedSubview:self.locateLabel];
|
||||
[self.locateDateStackView addArrangedSubview:line];
|
||||
[self.locateDateStackView addArrangedSubview:self.birthDateLabel];
|
||||
[self.locateDateStackView addArrangedSubview:StackSpring(UILayoutConstraintAxisHorizontal)];
|
||||
[self.locateDateStackView addArrangedSubview:[self stackSpaceView]];
|
||||
}
|
||||
|
||||
- (void)setupTagsArea {
|
||||
[self.userInfoView addSubview:self.tagStackView];
|
||||
///用户信息中的标签
|
||||
// [self.tagStackView addArrangedSubview:[self stackSpaceView]];
|
||||
[self.tagStackView addArrangedSubview:self.newUserImageView];
|
||||
[self.tagStackView addArrangedSubview:self.officialImageView];
|
||||
[self.tagStackView addArrangedSubview:self.experImageView];
|
||||
[self.tagStackView addArrangedSubview:self.charmImageView];
|
||||
[self.tagStackView addArrangedSubview:self.namePlateView];
|
||||
[self.tagStackView addArrangedSubview:self.rechargeImageView];
|
||||
// [self.tagStackView addArrangedSubview:[self stackSpaceView]];
|
||||
|
||||
///铭牌
|
||||
[self.namePlateView addSubview:self.nameplateImageView];
|
||||
[self.namePlateView addSubview:self.nameplateLabel];
|
||||
[self.nameplateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(30);
|
||||
make.top.mas_equalTo(0);
|
||||
make.width.mas_equalTo(80);
|
||||
}];
|
||||
[self.nameplateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.mas_equalTo(self.nameplateImageView);
|
||||
make.trailing.mas_equalTo(self.namePlateView).offset(-2);
|
||||
}];
|
||||
|
||||
[self.tagStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.locateDateStackView.mas_bottom).offset(4);
|
||||
make.leading.trailing.mas_equalTo(self.userInfoView);
|
||||
make.centerX.mas_equalTo(self.userInfoView);
|
||||
make.leading.mas_equalTo(self.newUserImageView);
|
||||
make.trailing.mas_equalTo(self.rechargeImageView);
|
||||
}];
|
||||
[self.newUserImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(20);
|
||||
}];
|
||||
[self.officalImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.officialImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(20);
|
||||
}];
|
||||
[self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -287,29 +385,6 @@ return view;\
|
||||
make.height.mas_equalTo(30);
|
||||
make.width.mas_equalTo(80);
|
||||
}];
|
||||
|
||||
///用户信息中的标签
|
||||
[self.tagStackView addArrangedSubview:[self stackSpaceView]];
|
||||
[self.tagStackView addArrangedSubview:self.newUserImageView];
|
||||
[self.tagStackView addArrangedSubview:self.officalImageView];
|
||||
[self.tagStackView addArrangedSubview:self.experImageView];
|
||||
[self.tagStackView addArrangedSubview:self.charmImageView];
|
||||
[self.tagStackView addArrangedSubview:self.namePlateView];
|
||||
[self.tagStackView addArrangedSubview:self.rechargeImageView];
|
||||
[self.tagStackView addArrangedSubview:[self stackSpaceView]];
|
||||
|
||||
///铭牌
|
||||
[self.namePlateView addSubview:self.nameplateImageView];
|
||||
[self.namePlateView addSubview:self.nameplateLabel];
|
||||
[self.nameplateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(30);
|
||||
make.top.mas_equalTo(0);
|
||||
make.width.mas_equalTo(80);
|
||||
}];
|
||||
[self.nameplateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.mas_equalTo(self.nameplateImageView);
|
||||
make.trailing.mas_equalTo(self.namePlateView).offset(-2);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setupCustomDesc {
|
||||
@@ -324,7 +399,7 @@ return view;\
|
||||
- (void)setupRelationshipArea {
|
||||
[self.userInfoView addSubview:self.relationshipView];
|
||||
[self.relationshipView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.signLabel.mas_bottom);
|
||||
make.top.mas_equalTo(self.signLabel.mas_bottom).offset(10);
|
||||
make.left.mas_equalTo(self.userInfoView).offset(14);
|
||||
make.right.mas_equalTo(self.userInfoView).offset(-14);
|
||||
make.height.mas_equalTo(55);
|
||||
@@ -338,21 +413,29 @@ return view;\
|
||||
make.size.mas_equalTo(CGSizeMake(1.5, 20));
|
||||
}];
|
||||
|
||||
UILabel *followerTitle = [UILabel labelInitWithText:@"关注"
|
||||
UILabel *followerTitle = [UILabel labelInitWithText:YMLocalizedString(@"XPMineHeadView4")
|
||||
font:[UIFont systemFontOfSize:13 weight:UIFontWeightBold]
|
||||
textColor:[UIColor colorWithWhite:1 alpha:0.8]];
|
||||
UILabel *fansTitle = [UILabel labelInitWithText:@"粉丝"
|
||||
UILabel *fansTitle = [UILabel labelInitWithText:YMLocalizedString(@"XPMineHeadView5")
|
||||
font:[UIFont systemFontOfSize:13 weight:UIFontWeightBold]
|
||||
textColor:[UIColor colorWithWhite:1 alpha:0.8]];
|
||||
[self.relationshipView addSubview:followerTitle];
|
||||
[followerTitle mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.relationshipView).offset(10);
|
||||
make.right.mas_equalTo(line.mas_left).offset(-60);
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(line.mas_right).offset(60);
|
||||
} else {
|
||||
make.right.mas_equalTo(line.mas_left).offset(-60);
|
||||
}
|
||||
}];
|
||||
[self.relationshipView addSubview:fansTitle];
|
||||
[fansTitle mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.relationshipView).offset(10);
|
||||
make.left.mas_equalTo(line.mas_right).offset(60);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(line.mas_left).offset(-60);
|
||||
} else {
|
||||
make.left.mas_equalTo(line.mas_right).offset(60);
|
||||
}
|
||||
}];
|
||||
|
||||
[self.relationshipView addSubview:self.followersNum];
|
||||
@@ -369,12 +452,9 @@ return view;\
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
|
||||
[self addSubview:self.reviewIcon];
|
||||
|
||||
[self.onlineView addSubview:self.onlineIconView];
|
||||
[self.onlineView addSubview:self.onlineTitleView];
|
||||
[self.onlineView addSubview:self.onlineButton];
|
||||
// [self.onlineView addSubview:self.onlineIconView];
|
||||
// [self.onlineView addSubview:self.onlineTitleView];
|
||||
// [self.onlineView addSubview:self.onlineButton];
|
||||
|
||||
[self.singStackView addArrangedSubview:self.tagView];
|
||||
[self.singStackView addArrangedSubview:self.signBackView];
|
||||
@@ -401,27 +481,27 @@ return view;\
|
||||
make.height.mas_equalTo(50);
|
||||
}];
|
||||
|
||||
[self.onlineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.avatarView);
|
||||
make.width.mas_equalTo(84);
|
||||
make.leading.mas_equalTo(4);
|
||||
make.height.mas_equalTo(22);
|
||||
|
||||
}];
|
||||
// [self.onlineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.bottom.equalTo(self.avatarView);
|
||||
// make.width.mas_equalTo(84);
|
||||
// make.leading.mas_equalTo(4);
|
||||
// make.height.mas_equalTo(22);
|
||||
//
|
||||
// }];
|
||||
[self.onlineIconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(18);
|
||||
make.top.mas_equalTo(3);
|
||||
make.width.mas_equalTo(12);
|
||||
make.height.mas_equalTo(12);
|
||||
}];
|
||||
[self.onlineTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.equalTo(self.onlineIconView);
|
||||
make.leading.mas_equalTo(32);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
[self.onlineButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.onlineView);
|
||||
}];
|
||||
// [self.onlineTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.centerY.equalTo(self.onlineIconView);
|
||||
// make.leading.mas_equalTo(32);
|
||||
// make.height.mas_equalTo(14);
|
||||
// }];
|
||||
// [self.onlineButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.equalTo(self.onlineView);
|
||||
// }];
|
||||
|
||||
[self.pageButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-15);
|
||||
@@ -476,7 +556,7 @@ return view;\
|
||||
#pragma mark - SDCycleScrollViewDelegate
|
||||
-(void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didScrollToIndex:(NSInteger)index {
|
||||
[self.pageButton setTitle:[NSString stringWithFormat:@"%ld/%lu",(index + 1), (unsigned long)self.imageUrls.count] forState:UIControlStateNormal];
|
||||
UserPhoto * photo = [self.userPhtotArray objectAtIndex:index];
|
||||
UserPhoto * photo = [self.userPhotoArray objectAtIndex:index];
|
||||
self.reviewIcon.hidden = !photo.isReview;
|
||||
}
|
||||
|
||||
@@ -537,33 +617,92 @@ return view;\
|
||||
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (CGFloat)widthOfText:(NSString *)text withFont:(UIFont *)font {
|
||||
NSDictionary *attributes = @{NSFontAttributeName: font};
|
||||
CGSize textSize = [text sizeWithAttributes:attributes];
|
||||
return textSize.width;
|
||||
}
|
||||
|
||||
- (void)setUserInfo:(UserInfoModel *)userInfo {
|
||||
_userInfo = userInfo;
|
||||
if (_userInfo) {
|
||||
self.nameLabel.text = _userInfo.nick;
|
||||
self.birthDateLabel.text = @"1987-99-00";//[NSString calculateConstellationWithMonth:userInfo.birth];
|
||||
self.locateLabel.text = userInfo.region;
|
||||
self.nameLabel.text = userInfo.nick;
|
||||
CGFloat width = [self widthOfText:userInfo.nick withFont:self.nameLabel.font] + 4;
|
||||
[self.nameLabel mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(width);
|
||||
}];
|
||||
|
||||
NSString *text = [NSString stringWithFormat:@"ID:%ld", (long)_userInfo.erbanNo];
|
||||
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@ ",text] attributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x6D6B89)}];
|
||||
NSTextAttachment * attachment = [[NSTextAttachment alloc] init];
|
||||
UIImage *iconImage = [UIImage imageNamed:@"user_card_copy_id1"];;
|
||||
attachment.bounds = CGRectMake(0, roundf(self.idLabel.font.capHeight - iconImage.size.height)/2.f, iconImage.size.width, iconImage.size.height);
|
||||
attachment.image = iconImage;
|
||||
[textAtt insertAttributedString:[NSMutableAttributedString attributedStringWithAttachment:attachment] atIndex:textAtt.length];
|
||||
NSString *locateString = @"";
|
||||
if (userInfo.region.length > 0) {
|
||||
// if (isMSRTL()) {
|
||||
// locateString = [NSString stringWithFormat:@" | %@", userInfo.region];
|
||||
// } else {
|
||||
locateString = [NSString stringWithFormat:@"%@ | ", userInfo.region];
|
||||
// }
|
||||
}
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:userInfo.birth/1000];
|
||||
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
|
||||
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
|
||||
NSString *dateString = [dateFormatter stringFromDate:date];
|
||||
|
||||
// if (isMSRTL()) {
|
||||
// self.locateLabel.text = [NSString stringWithFormat:@"%@%@", dateString, locateString];
|
||||
// } else {
|
||||
self.locateLabel.text = [NSString stringWithFormat:@"%@%@", locateString, dateString];
|
||||
// }
|
||||
|
||||
NSString *text = @"";
|
||||
BOOL hasBeautifulID = userInfo.hasPrettyErbanNo;
|
||||
if (hasBeautifulID) {
|
||||
text = [NSString stringWithFormat:@"%ld", (long)_userInfo.erbanNo];
|
||||
} else {
|
||||
text = [NSString stringWithFormat:@" %ld", (long)_userInfo.erbanNo];
|
||||
}
|
||||
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@",text] attributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x191919)}];
|
||||
NSTextAttachment * attachment_id = [[NSTextAttachment alloc] init];
|
||||
UIImage *idIconImage = [UIImage imageNamed:@"user_info_id_mark"];
|
||||
attachment_id.bounds = CGRectMake(0, -1, 11, 11);
|
||||
attachment_id.image = idIconImage;
|
||||
if (!hasBeautifulID) {
|
||||
[textAtt insertAttributedString:[NSMutableAttributedString attributedStringWithAttachment:attachment_id] atIndex:0];
|
||||
}
|
||||
self.idLabel.attributedText = textAtt;
|
||||
self.beautifulImageView.hidden = !hasBeautifulID;
|
||||
if (hasBeautifulID) {
|
||||
self.idLabel.alpha = 1;
|
||||
self.idLabel.textColor = [UIColor whiteColor];
|
||||
// 加载原始图片
|
||||
UIImage *originalImage = [UIImage imageNamed:@"user_info_id_beatiful_mark"];
|
||||
|
||||
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : YMLocalizedString(@"XPTreasureFairyFriendCell0");
|
||||
// 设置图片拉伸区域的插入值 (cap insets)
|
||||
UIEdgeInsets capInsets = UIEdgeInsetsMake(0, 30, 0, 20);
|
||||
|
||||
// 创建拉伸后的图片
|
||||
UIImage *resizableImage = [originalImage resizableImageWithCapInsets:capInsets resizingMode:UIImageResizingModeStretch];
|
||||
|
||||
// 设置
|
||||
self.beautifulImageView.image = resizableImage;
|
||||
} else {
|
||||
self.idLabel.alpha = 0.8;
|
||||
if (isMSRTL()) {
|
||||
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.idLabel.mas_left).offset(-6);
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : YMLocalizedString(@"XPMineUserInfoHeaderView6");
|
||||
[self.signLabel setTextColor:_userInfo.userDesc.length > 0 ? UIColorFromRGB(0x1a1a1a) : UIColorRGBAlpha(0x1a1a1a, 0.6)];
|
||||
[self.signLabel setFont:_userInfo.userDesc.length > 0 ? [UIFont systemFontOfSize:12 weight:UIFontWeightMedium] : [UIFont systemFontOfSize:12 weight:UIFontWeightRegular]];
|
||||
self.fansNum.text = [@(_userInfo.fansNum) stringValue];
|
||||
self.followersNum.text = [@(_userInfo.followNum) stringValue];;
|
||||
self.followersNum.text = [@(_userInfo.followNum) stringValue];
|
||||
|
||||
[self.sexImageView setTitle:[NSString getAgeWithBirth:_userInfo.birth] forState:UIControlStateNormal];
|
||||
self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
self.sexImageView.titleEdgeInsets = _userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
|
||||
self.sexImageView.selected = _userInfo.gender != GenderType_Male;
|
||||
|
||||
self.officalImageView.hidden = userInfo.defUser != UserLevelType_Offical;
|
||||
self.beautifulImageView.hidden = !userInfo.hasPrettyErbanNo;
|
||||
self.officialImageView.hidden = userInfo.defUser != UserLevelType_Offical;
|
||||
self.newUserImageView.hidden = !userInfo.newUser;
|
||||
|
||||
NSString * headerUrl = userInfo.headwearEffect.length > 0 ? userInfo.headwearEffect : userInfo.headwearPic;
|
||||
@@ -575,6 +714,7 @@ return view;\
|
||||
@kStrongify(self);
|
||||
self.headWearImageView.image = sprit;
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
} else {
|
||||
self.headWearImageView.hidden = YES;
|
||||
@@ -621,13 +761,13 @@ return view;\
|
||||
}
|
||||
|
||||
self.rechargeImageView.hidden = !_userInfo.isRechargeUser;
|
||||
[self.userPhtotArray removeAllObjects];
|
||||
[self.userPhotoArray removeAllObjects];
|
||||
// 轮播图
|
||||
NSMutableArray * imageUrls = [NSMutableArray array];
|
||||
if (userInfo.avatar) {
|
||||
[imageUrls addObject:userInfo.avatar];
|
||||
if (![self.userPhtotArray containsObject:self.avatarPhoto]) {
|
||||
[self.userPhtotArray addObject:self.avatarPhoto];
|
||||
if (![self.userPhotoArray containsObject:self.avatarPhoto]) {
|
||||
[self.userPhotoArray addObject:self.avatarPhoto];
|
||||
}
|
||||
self.avatarPhoto.isReview = userInfo.isReview;
|
||||
self.avatarPhoto.photoUrl = userInfo.avatar;
|
||||
@@ -637,7 +777,7 @@ return view;\
|
||||
for (int i = 0; i < self.userInfo.privatePhoto.count; i++) {
|
||||
UserPhoto * photo = [self.userInfo.privatePhoto objectAtIndex:i];
|
||||
if (photo.photoUrl.length > 0) {
|
||||
[self.userPhtotArray addObject:photo];
|
||||
[self.userPhotoArray addObject:photo];
|
||||
[imageUrls addObject:photo.photoUrl];
|
||||
}
|
||||
}
|
||||
@@ -648,12 +788,12 @@ return view;\
|
||||
self.pi_cycleScrollView.imageURLStringsGroup = imageUrls;
|
||||
[self.pageButton setTitle:[NSString stringWithFormat:@"1/%lu",(unsigned long)imageUrls.count] forState:UIControlStateNormal];;
|
||||
// 要初始化一下当前的审核状态
|
||||
if(self.userPhtotArray.count > 0){
|
||||
self.reviewIcon.hidden = ![self.userPhtotArray objectAtIndex:0].isReview;
|
||||
if(self.userPhotoArray.count > 0){
|
||||
self.reviewIcon.hidden = ![self.userPhotoArray objectAtIndex:0].isReview;
|
||||
}
|
||||
}
|
||||
}
|
||||
// self.nobleImageView.hidden = userInfo.userVipInfoVO.vipIcon.length == 0;
|
||||
self.nobleImageView.hidden = userInfo.userVipInfoVO.vipIcon.length == 0;
|
||||
[self.nobleImageView loadImageWithUrl:userInfo.userVipInfoVO.vipIcon completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
self.nobleImageView.image = image;
|
||||
CGFloat height = image.size.height > 0 ? image.size.height : 1;
|
||||
@@ -663,14 +803,15 @@ return view;\
|
||||
}];
|
||||
}];
|
||||
|
||||
[self layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)setRoomUid:(NSString *)roomUid {
|
||||
_roomUid = roomUid;
|
||||
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES || [[XPRoomMiniManager shareManager] getRoomInfo] != nil){
|
||||
self.onlineView.hidden = _roomUid.length <= 0;
|
||||
self.onlineButton.hidden = _roomUid.length <= 0;
|
||||
}else{
|
||||
self.onlineView.hidden = YES;
|
||||
self.onlineButton.hidden = YES;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -681,7 +822,10 @@ return view;\
|
||||
if(text.length > 0){
|
||||
XPMineUserInfoTagItemModel *model = [XPMineUserInfoTagItemModel new];
|
||||
model.label = text;
|
||||
CGRect stringRect = [text boundingRectWithSize:CGSizeMake(MAXFLOAT, 18) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightRegular]} context:nil];
|
||||
CGRect stringRect = [text boundingRectWithSize:CGSizeMake(MAXFLOAT, 18)
|
||||
options:NSStringDrawingUsesLineFragmentOrigin
|
||||
attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightRegular]}
|
||||
context:nil];
|
||||
model.width = stringRect.size.width + 14;
|
||||
[itemList addObject:model];
|
||||
}
|
||||
@@ -702,10 +846,11 @@ return view;\
|
||||
- (UIView *)userInfoView {
|
||||
if (!_userInfoView) {
|
||||
_userInfoView = [[UIView alloc] init];
|
||||
_userInfoView.backgroundColor = [UIColor clearColor];
|
||||
_userInfoView.backgroundColor = [UIColor yellowColor];
|
||||
_userInfoView.layer.masksToBounds = NO;
|
||||
_userInfoView.layer.cornerRadius = 8;
|
||||
_userInfoView.backgroundColor = [UIColor whiteColor];
|
||||
// _userInfoView.backgroundColor = [UIColor yellowColor];
|
||||
_userInfoView.layer.masksToBounds = YES;
|
||||
_userInfoView.layer.cornerRadius = 16;
|
||||
_userInfoView.clipsToBounds = YES;
|
||||
}
|
||||
return _userInfoView;
|
||||
}
|
||||
@@ -713,11 +858,14 @@ return view;\
|
||||
- (UIStackView *)nickStackView {
|
||||
if (!_nickStackView) {
|
||||
_nickStackView = [[UIStackView alloc] init];
|
||||
_nickStackView.backgroundColor = [UIColor systemBlueColor];
|
||||
_nickStackView.backgroundColor = [UIColor clearColor];
|
||||
_nickStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_nickStackView.distribution = UIStackViewDistributionEqualCentering;
|
||||
_nickStackView.alignment = UIStackViewAlignmentCenter;
|
||||
_nickStackView.spacing = 5;
|
||||
_nickStackView.spacing = 4;
|
||||
if (isMSRTL()) {
|
||||
_nickStackView.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
|
||||
}
|
||||
}
|
||||
return _nickStackView;
|
||||
}
|
||||
@@ -727,6 +875,9 @@ return view;\
|
||||
_nameLabel = [[UILabel alloc] init];
|
||||
_nameLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
|
||||
_nameLabel.textColor = UIColorFromRGB(0x1A1A1A);
|
||||
_nameLabel.numberOfLines = 1;
|
||||
[_nameLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
[_nameLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
}
|
||||
return _nameLabel;
|
||||
}
|
||||
@@ -748,11 +899,15 @@ return view;\
|
||||
- (UIStackView *)idStackView {
|
||||
if (!_idStackView) {
|
||||
_idStackView = [[UIStackView alloc] init];
|
||||
_idStackView.backgroundColor = [UIColor greenColor];
|
||||
_idStackView.backgroundColor = [UIColor clearColor];
|
||||
_idStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_idStackView.distribution = UIStackViewDistributionEqualCentering;
|
||||
_idStackView.alignment = UIStackViewAlignmentCenter;
|
||||
_idStackView.spacing = 5;
|
||||
_idStackView.clipsToBounds = NO;
|
||||
|
||||
UITapGestureRecognizer *longPress = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(copyNameAction)];
|
||||
[_idStackView addGestureRecognizer:longPress];
|
||||
}
|
||||
return _idStackView;
|
||||
}
|
||||
@@ -761,7 +916,8 @@ return view;\
|
||||
if (!_beautifulImageView) {
|
||||
_beautifulImageView = [[UIImageView alloc] init];
|
||||
_beautifulImageView.userInteractionEnabled = YES;
|
||||
_beautifulImageView.image = [UIImage getLanguageImage:@"common_icon_beautiful"];
|
||||
_beautifulImageView.hidden = YES;
|
||||
// _beautifulImageView.image = [UIImage getLanguageImage:@"user_info_id_beatiful_mark"];
|
||||
}
|
||||
return _beautifulImageView;
|
||||
}
|
||||
@@ -772,24 +928,38 @@ return view;\
|
||||
_idLabel.font = [UIFont systemFontOfSize:11 weight:UIFontWeightMedium];
|
||||
_idLabel.textColor = UIColorFromRGB(0x191919);
|
||||
_idLabel.userInteractionEnabled = YES;
|
||||
UITapGestureRecognizer *longPress = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(copyNameAction)];
|
||||
[_idLabel addGestureRecognizer:longPress];
|
||||
_idLabel.clipsToBounds = NO;
|
||||
}
|
||||
return _idLabel;
|
||||
}
|
||||
|
||||
-(UIImageView *)onlineView{
|
||||
if (!_onlineView){
|
||||
_onlineView = [UIImageView new];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:1 imgSize:CGSizeMake(84, 22)];
|
||||
_onlineView.image = image;
|
||||
_onlineView.userInteractionEnabled = YES;
|
||||
_onlineView.hidden = YES;
|
||||
|
||||
- (UIImageView *)copyIdImageView {
|
||||
if (!_copyIdImageView) {
|
||||
_copyIdImageView = [[UIImageView alloc] init];
|
||||
_copyIdImageView.userInteractionEnabled = YES;
|
||||
_copyIdImageView.image = [UIImage getLanguageImage:@"user_card_copy_id1"];
|
||||
}
|
||||
return _onlineView;
|
||||
return _copyIdImageView;
|
||||
}
|
||||
|
||||
//-(UIImageView *)onlineView{
|
||||
// if (!_onlineView){
|
||||
// _onlineView = [UIImageView new];
|
||||
// UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:1 imgSize:CGSizeMake(84, 22)];
|
||||
// _onlineView.image = image;
|
||||
// _onlineView.userInteractionEnabled = YES;
|
||||
// _onlineView.hidden = YES;
|
||||
//
|
||||
// }
|
||||
// return _onlineView;
|
||||
//}
|
||||
//-(UILabel *)onlineTitleView{
|
||||
// if (!_onlineTitleView){
|
||||
// _onlineTitleView = [UILabel labelInitWithText:YMLocalizedString(@"XPMineUserInfoHeaderView3") font:[UIFont systemFontOfSize:11 weight:UIFontWeightRegular] textColor:[UIColor whiteColor]];
|
||||
// }
|
||||
// return _onlineTitleView;
|
||||
//}
|
||||
|
||||
- (SVGAImageView *)onlineIconView {
|
||||
if (_onlineIconView == nil) {
|
||||
_onlineIconView = [[SVGAImageView alloc]init];
|
||||
@@ -800,14 +970,6 @@ return view;\
|
||||
return _onlineIconView;
|
||||
}
|
||||
|
||||
|
||||
-(UILabel *)onlineTitleView{
|
||||
if (!_onlineTitleView){
|
||||
_onlineTitleView = [UILabel labelInitWithText:YMLocalizedString(@"XPMineUserInfoHeaderView3") font:[UIFont systemFontOfSize:11 weight:UIFontWeightRegular] textColor:[UIColor whiteColor]];
|
||||
}
|
||||
return _onlineTitleView;
|
||||
}
|
||||
|
||||
- (UIButton *)onlineButton {
|
||||
if (!_onlineButton) {
|
||||
_onlineButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
@@ -818,9 +980,18 @@ return view;\
|
||||
[_onlineButton addTarget:self
|
||||
action:@selector(onlineButtonAction:)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
[_onlineButton setTitle:YMLocalizedString(@"XPMineSimpleUserInfoHeaderView2") forState:UIControlStateNormal];
|
||||
[_onlineButton setImage:[UIImage imageNamed:@"mine_online_mark"] forState:UIControlStateNormal];
|
||||
[_onlineButton setTitle:[NSString stringWithFormat:@" %@ ", YMLocalizedString(@"XPMineSimpleUserInfoHeaderView2")]
|
||||
forState:UIControlStateNormal];
|
||||
[_onlineButton.titleLabel setFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium]];
|
||||
[_onlineButton setTitleColor:UIColorFromRGB(0xf7f7f7) forState:UIControlStateNormal];
|
||||
// [_onlineButton setImage:[UIImage imageNamed:@"mine_online_mark"] forState:UIControlStateNormal];
|
||||
[_onlineButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||
_onlineButton.layer.cornerRadius = 11;
|
||||
_onlineButton.layer.masksToBounds = YES;
|
||||
_onlineButton.hidden = YES;
|
||||
|
||||
// CGFloat spacing = 4.0; // 图片和标题之间的间距
|
||||
// _onlineButton.imageEdgeInsets = UIEdgeInsetsMake(0, spacing / 2, 0, 0);
|
||||
}
|
||||
return _onlineButton;
|
||||
}
|
||||
@@ -870,9 +1041,9 @@ return view;\
|
||||
if (!_tagStackView) {
|
||||
_tagStackView = [[UIStackView alloc] init];
|
||||
_tagStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_tagStackView.distribution = UIStackViewDistributionEqualCentering;
|
||||
_tagStackView.distribution = UIStackViewDistributionFillProportionally;
|
||||
_tagStackView.alignment = UIStackViewAlignmentCenter;
|
||||
_tagStackView.spacing = 2;
|
||||
_tagStackView.spacing = 4;
|
||||
}
|
||||
return _tagStackView;
|
||||
}
|
||||
@@ -941,14 +1112,14 @@ return view;\
|
||||
return _newUserImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)officalImageView {
|
||||
if (!_officalImageView) {
|
||||
_officalImageView = [[UIImageView alloc] init];
|
||||
_officalImageView.userInteractionEnabled = YES;
|
||||
_officalImageView.image = [UIImage imageNamed:@"common_offical"];
|
||||
_officalImageView.hidden = YES;
|
||||
- (UIImageView *)officialImageView {
|
||||
if (!_officialImageView) {
|
||||
_officialImageView = [[UIImageView alloc] init];
|
||||
_officialImageView.userInteractionEnabled = YES;
|
||||
_officialImageView.image = [UIImage imageNamed:@"common_offical"];
|
||||
_officialImageView.hidden = YES;
|
||||
}
|
||||
return _officalImageView;
|
||||
return _officialImageView;
|
||||
}
|
||||
|
||||
- (UIView *)signBackView {
|
||||
@@ -960,31 +1131,22 @@ return view;\
|
||||
return _signBackView;
|
||||
}
|
||||
|
||||
//- (UIView *)lineView {
|
||||
// if (!_lineView) {
|
||||
// _lineView = [[UIView alloc] init];
|
||||
// _lineView.backgroundColor = [DJDKMIMOMColor dividerColor];
|
||||
// }
|
||||
// return _lineView;
|
||||
//}
|
||||
|
||||
- (UILabel *)signLabel {
|
||||
if (!_signLabel) {
|
||||
_signLabel = [[UILabel alloc] init];
|
||||
_signLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_signLabel.textColor = UIColorFromRGB(0x1a1a1a);
|
||||
_signLabel.numberOfLines = 2;
|
||||
_signLabel.numberOfLines = 0;
|
||||
_signLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _signLabel;
|
||||
}
|
||||
|
||||
|
||||
- (NSMutableArray *)userPhtotArray {
|
||||
if (!_userPhtotArray) {
|
||||
_userPhtotArray = [NSMutableArray array];
|
||||
- (NSMutableArray *)userPhotoArray {
|
||||
if (!_userPhotoArray) {
|
||||
_userPhotoArray = [NSMutableArray array];
|
||||
}
|
||||
return _userPhtotArray;
|
||||
return _userPhotoArray;
|
||||
}
|
||||
|
||||
- (UserPhoto *)avatarPhoto {
|
||||
@@ -1037,7 +1199,7 @@ return view;\
|
||||
- (UIStackView *)singStackView {
|
||||
if (!_singStackView) {
|
||||
_singStackView = [[UIStackView alloc] init];
|
||||
_singStackView.backgroundColor = [UIColor systemRedColor];
|
||||
_singStackView.backgroundColor = [UIColor clearColor];
|
||||
_singStackView.axis = UILayoutConstraintAxisVertical;
|
||||
_singStackView.distribution = UIStackViewDistributionFill;
|
||||
_singStackView.alignment = UIStackViewAlignmentCenter;
|
||||
@@ -1056,8 +1218,8 @@ return view;\
|
||||
- (NetImageView *)nobleImageView {
|
||||
if (!_nobleImageView) {
|
||||
_nobleImageView = [[NetImageView alloc] init];
|
||||
_nobleImageView.backgroundColor = [UIColor purpleColor];
|
||||
// _nobleImageView.hidden = YES;
|
||||
// _nobleImageView.backgroundColor = [UIColor purpleColor];
|
||||
_nobleImageView.hidden = YES;
|
||||
}
|
||||
return _nobleImageView;
|
||||
}
|
||||
@@ -1065,9 +1227,9 @@ return view;\
|
||||
- (UIStackView *)locateDateStackView {
|
||||
if (!_locateDateStackView) {
|
||||
_locateDateStackView = [[UIStackView alloc] init];
|
||||
_locateDateStackView.backgroundColor = [UIColor systemRedColor];
|
||||
_locateDateStackView.backgroundColor = [UIColor clearColor];
|
||||
_locateDateStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_locateDateStackView.distribution = UIStackViewDistributionFill;
|
||||
_locateDateStackView.distribution = UIStackViewDistributionEqualCentering;
|
||||
_locateDateStackView.alignment = UIStackViewAlignmentCenter;
|
||||
_locateDateStackView.spacing = 6;
|
||||
}
|
||||
@@ -1083,21 +1245,14 @@ return view;\
|
||||
return _locateLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)birthDateLabel {
|
||||
if (!_birthDateLabel) {
|
||||
_birthDateLabel = [[UILabel alloc] init];
|
||||
_birthDateLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_birthDateLabel.textColor = UIColorFromRGB(0x1a1a1a);
|
||||
}
|
||||
return _birthDateLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)relationshipView {
|
||||
if (!_relationshipView) {
|
||||
_relationshipView = [[UIImageView alloc] init];
|
||||
_relationshipView.image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x41EABA), UIColorFromRGB(0x26cc9c)]
|
||||
gradientType:GradientTypeTopToBottom
|
||||
imgSize:CGSizeMake(360, 55)];
|
||||
_relationshipView.layer.cornerRadius = 14.5;
|
||||
_relationshipView.layer.masksToBounds = YES;
|
||||
_relationshipView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _relationshipView;
|
||||
|
@@ -41,7 +41,7 @@
|
||||
|
||||
- (void)setDynamicInfo:(NSArray<MonentsInfoModel *> *)dynamicInfo {
|
||||
[self.datasource removeAllObjects];
|
||||
// [self.datasource addObjectsFromArray:dynamicInfo];
|
||||
[self.datasource addObjectsFromArray:dynamicInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
_tableView.backgroundColor = [UIColor whiteColor];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
@@ -261,7 +261,7 @@
|
||||
-(UIView *)headView{
|
||||
if (!_headView){
|
||||
_headView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 30)];
|
||||
_headView.backgroundColor = [UIColor clearColor];
|
||||
_headView.backgroundColor = [UIColor whiteColor];
|
||||
UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(15, 0, KScreenWidth-30, 30)];
|
||||
[_headView addSubview:bgView];
|
||||
bgView.backgroundColor = [UIColor whiteColor];
|
||||
|
@@ -51,7 +51,7 @@
|
||||
if (!_emptyImageView) {
|
||||
_emptyImageView = [[UIImageView alloc] init];
|
||||
_emptyImageView.userInteractionEnabled = YES;
|
||||
_emptyImageView.image = [UIImageConstant defaultEmptyPlaceholder];
|
||||
_emptyImageView.image = [UIImageConstant defaultEmptyPlaceholder_UFO];
|
||||
_emptyImageView.layer.masksToBounds = YES;
|
||||
_emptyImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@
|
||||
[[self getView] getHomeRecommendRoomListFail:msg ];
|
||||
}]
|
||||
pageNum:[NSString stringWithFormat:@"%ld", page]
|
||||
pageSize:@"10"
|
||||
pageSize:@"50"
|
||||
tabId:tabId];
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
[[self getView] getMineCollectRoomsSuccess:array];
|
||||
}
|
||||
pageNum:[NSString stringWithFormat:@"%ld", page]
|
||||
pageSize:@"10"];
|
||||
pageSize:@"50"];
|
||||
}
|
||||
|
||||
- (void)getMyRecentRooms:(NSInteger)page {
|
||||
@@ -80,7 +80,7 @@
|
||||
[[self getView] getMineRecentRoomsSuccess:array];
|
||||
}
|
||||
pageNum:[NSString stringWithFormat:@"%ld", page]
|
||||
pageSize:@"10"];
|
||||
pageSize:@"50"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -152,10 +152,10 @@
|
||||
_rankImageView.image = nil;
|
||||
_pkImageView.hidden = !_roomInfo.crossPking;
|
||||
if(_roomInfo.isHourTop1 == YES){
|
||||
_rankImageView.image = [[UIImage getLanguageImage:@"home_hour_no_1"]ms_SetImageForRTL];
|
||||
_rankImageView.image = [UIImage getLanguageImage:@"home_hour_no_1"];
|
||||
}else{
|
||||
if(_roomInfo.isWeekTop1 == YES){
|
||||
_rankImageView.image = [[UIImage getLanguageImage:@"home_week_no_1"] ms_SetImageForRTL];
|
||||
_rankImageView.image = [UIImage getLanguageImage:@"home_week_no_1"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -120,6 +120,7 @@
|
||||
}];
|
||||
|
||||
UIButton *searchButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[searchButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||
[searchButton setBackgroundImage:[UIImage imageNamed:@"home_nav_search"] forState:UIControlStateNormal];
|
||||
[searchButton addTarget:self
|
||||
action:@selector(didTapSearchButton)
|
||||
|
@@ -13,7 +13,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
typedef NS_ENUM(NSInteger, RoomType) {
|
||||
RoomType_Game = 3,
|
||||
RoomType_Anchor = 6, // 个播房
|
||||
RoomType_MiniGame = 7//小游戏房
|
||||
RoomType_MiniGame = 7,//小游戏房
|
||||
RoomType_10Mic = 8,//10 个麦位
|
||||
RoomType_15Mic = 9,//15 个麦位
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, RoomModeType){
|
||||
@@ -34,7 +36,7 @@ typedef NS_ENUM(NSInteger, RoomModeType){
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, PermitRoomType) {
|
||||
PermitRoomType_Licnese = 1,//牌照
|
||||
PermitRoomType_License = 1,//牌照
|
||||
PermitRoomType_YoungerStar = 3,//新秀
|
||||
PermitRoomType_Other//其他
|
||||
};
|
||||
@@ -173,6 +175,7 @@ typedef NS_ENUM(NSInteger, RoomDatingStateChangeType) {
|
||||
//1 厅内红包 2 全服红包 3 厅内红包+全服红包
|
||||
@property(nonatomic,assign) NSInteger redEnvelopeType;
|
||||
|
||||
@property (nonatomic , assign) RoomType oldType;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -37,14 +37,18 @@
|
||||
RACSubject* room = [RACSubject subject];
|
||||
RACSubject* user = [RACSubject subject];
|
||||
|
||||
@kWeakify(self);
|
||||
[[RACSignal combineLatest:@[room, user] reduce:^id(RoomInfoModel* room, UserInfoModel* user){
|
||||
@kStrongify(self);
|
||||
[[self getView] initEnterRoomSuccess:room user:user];
|
||||
return nil;
|
||||
}] subscribeError:^(NSError * _Nullable error) {
|
||||
@kStrongify(self);
|
||||
[[self getView] enterRoomFail:error.code];
|
||||
}];
|
||||
|
||||
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@kStrongify(self);
|
||||
UserInfoModel * infoModel = [UserInfoModel modelWithJSON:data.data];
|
||||
self.infoModel = infoModel;
|
||||
[user sendNext:infoModel];
|
||||
|
@@ -1853,17 +1853,12 @@
|
||||
[kWindow addSubview:broadcastView];
|
||||
return;
|
||||
}
|
||||
if (!giftInfo.isInRoomVisiable && giftInfo.roomUid.length > 0 && giftInfo.roomUid.integerValue != self.delegate.getRoomInfo.uid) {
|
||||
[self.delegate exitRoom];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[XPRoomViewController openRoom:giftInfo.roomUid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!giftInfo.isInRoomVisiable && giftInfo.roomUid.length > 0 && giftInfo.roomUid.integerValue != self.delegate.getRoomInfo.uid) {
|
||||
[self.delegate exitRoom];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[XPRoomViewController openRoom:giftInfo.roomUid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 普通礼物
|
||||
|
@@ -119,12 +119,12 @@
|
||||
@property (nonatomic, strong) XPAnchorFansTeamEntranceView *fansTeamEntranceView;
|
||||
///个播小时榜入口按钮
|
||||
@property (nonatomic, strong) XPRoomAnchorRankEnterView *hourRankEntranceView;
|
||||
///话题的容器
|
||||
@property (nonatomic,strong) UIStackView *topicStackView;
|
||||
///话题
|
||||
@property (nonatomic,strong) UILabel *topicLabel;
|
||||
///编辑
|
||||
@property (nonatomic,strong) UIButton *editButton;
|
||||
/////话题的容器
|
||||
//@property (nonatomic,strong) UIStackView *topicStackView;
|
||||
/////话题
|
||||
//@property (nonatomic,strong) UILabel *topicLabel;
|
||||
/////编辑
|
||||
//@property (nonatomic,strong) UIButton *editButton;
|
||||
///跨房pk的面板
|
||||
@property (nonatomic,strong) XPAcrossRoomPKPanelView *acrossPKPanelView;
|
||||
///跨房PK预约倒计时
|
||||
@@ -258,9 +258,9 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.rankStackView];
|
||||
[self addSubview:self.topicStackView];
|
||||
[self.topicStackView addArrangedSubview:self.topicLabel];
|
||||
[self.topicStackView addArrangedSubview:self.editButton];
|
||||
// [self addSubview:self.topicStackView];
|
||||
// [self.topicStackView addArrangedSubview:self.topicLabel];
|
||||
// [self.topicStackView addArrangedSubview:self.editButton];
|
||||
[self addSubview:self.onlineView];
|
||||
|
||||
[self.rankStackView addArrangedSubview:self.hourRankEntranceView];
|
||||
@@ -293,11 +293,11 @@
|
||||
make.width.mas_greaterThanOrEqualTo(50);
|
||||
}];
|
||||
|
||||
[self.topicStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.height.mas_equalTo(15);
|
||||
make.top.mas_equalTo(50 + 5 + 6 + 12 + 3 + kNavigationHeight);
|
||||
}];
|
||||
// [self.topicStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.centerX.mas_equalTo(self);
|
||||
// make.height.mas_equalTo(15);
|
||||
// make.top.mas_equalTo(50 + 5 + 6 + 12 + 3 + kNavigationHeight);
|
||||
// }];
|
||||
[self.onlineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-6);
|
||||
make.height.mas_equalTo(24);
|
||||
@@ -309,7 +309,7 @@
|
||||
- (void)configLittleGameState {
|
||||
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
|
||||
|
||||
if (roomInfo.isPermitRoom != PermitRoomType_Licnese && roomInfo.roomModeType != RoomModeType_Open_Blind && roomInfo.roomModeType != RoomModeType_Open_PK_Mode && roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode && roomInfo.roomModeType != RoomModeType_Open_Micro_Mode && !roomInfo.leaveMode && roomInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
if (roomInfo.isPermitRoom != PermitRoomType_License && roomInfo.roomModeType != RoomModeType_Open_Blind && roomInfo.roomModeType != RoomModeType_Open_PK_Mode && roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode && roomInfo.roomModeType != RoomModeType_Open_Micro_Mode && !roomInfo.leaveMode && roomInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
if (!self.gameListView.superview) {
|
||||
[self addSubview:self.gameListView];
|
||||
[self.gameListView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -988,7 +988,7 @@
|
||||
{
|
||||
for (NIMChatroomNotificationMember * member in content.targets) {
|
||||
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
self.editButton.hidden = NO;
|
||||
// self.editButton.hidden = NO;
|
||||
self.pkPanelView.isManager = YES;
|
||||
break;
|
||||
}
|
||||
@@ -999,7 +999,7 @@
|
||||
{
|
||||
for (NIMChatroomNotificationMember * member in content.targets) {
|
||||
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
self.editButton.hidden = YES;
|
||||
// self.editButton.hidden = YES;
|
||||
self.pkPanelView.isManager = NO;
|
||||
break;
|
||||
}
|
||||
@@ -1286,45 +1286,46 @@
|
||||
|
||||
#pragma mark - 房间话题
|
||||
- (void)updateRoomTopicViewConstraint {
|
||||
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
|
||||
CGFloat offsetY = kNavigationHeight;
|
||||
if (roomInfo.roomModeType == RoomModeType_Open_Blind) {
|
||||
offsetY += ((50 + 5) * kScreenScale + 10 + 12 + 3 + 40);
|
||||
} else if (roomInfo.type == RoomType_Anchor) {
|
||||
offsetY += (120 + 5 + 6 + 20 +60 + 3);
|
||||
} else {
|
||||
offsetY += (50 + 5 + 10 + 12 + 3 + 40);
|
||||
}
|
||||
|
||||
[self.topicStackView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(offsetY);
|
||||
}];
|
||||
// self.topicStackView.hidden = YES;
|
||||
// RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
|
||||
// CGFloat offsetY = kNavigationHeight;
|
||||
// if (roomInfo.roomModeType == RoomModeType_Open_Blind) {
|
||||
// offsetY += ((50 + 5) * kScreenScale + 10 + 12 + 3 + 40);
|
||||
// } else if (roomInfo.type == RoomType_Anchor) {
|
||||
// self.topicStackView.hidden = NO;
|
||||
// offsetY += (120 + 5 + 6 + 20 +60 + 3);
|
||||
// } else {
|
||||
// offsetY += (50 + 5 + 10 + 12 + 3 + 40);
|
||||
// }
|
||||
//
|
||||
// [self.topicStackView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(offsetY);
|
||||
// }];
|
||||
}
|
||||
|
||||
- (void)updateRoomTopic {
|
||||
|
||||
if (self.delegate.getRoomInfo.type == RoomType_Anchor && self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode) {
|
||||
self.topicStackView.hidden = YES;
|
||||
} else {
|
||||
self.topicStackView.hidden = ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion || self.delegate.getRoomInfo.type == RoomType_MiniGame) == YES;
|
||||
}
|
||||
[self updateRoomTopicViewConstraint];
|
||||
if ([AccountInfoStorage instance].getUid.length > 0) {
|
||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||
request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId];
|
||||
request.userIds = @[[AccountInfoStorage instance].getUid];
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||
if (error== nil) {
|
||||
NIMChatroomMember* member = members.firstObject;
|
||||
if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) {
|
||||
self.editButton.hidden = NO;
|
||||
} else {
|
||||
self.editButton.hidden = YES;
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
self.topicLabel.text = self.delegate.getRoomInfo.roomDesc.length > 0 ? self.delegate.getRoomInfo.roomDesc : YMLocalizedString(@"XPRoomFunctionContainerView12");
|
||||
// if (self.delegate.getRoomInfo.type == RoomType_Anchor && self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode) {
|
||||
// self.topicStackView.hidden = YES;
|
||||
// } else {
|
||||
// self.topicStackView.hidden = ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion || self.delegate.getRoomInfo.type == RoomType_MiniGame) == YES;
|
||||
// }
|
||||
// [self updateRoomTopicViewConstraint];
|
||||
// if ([AccountInfoStorage instance].getUid.length > 0) {
|
||||
// NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||
// request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId];
|
||||
// request.userIds = @[[AccountInfoStorage instance].getUid];
|
||||
// [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||
// if (error== nil) {
|
||||
// NIMChatroomMember* member = members.firstObject;
|
||||
// if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) {
|
||||
// self.editButton.hidden = NO;
|
||||
// } else {
|
||||
// self.editButton.hidden = YES;
|
||||
// }
|
||||
// }
|
||||
// }];
|
||||
// }
|
||||
// self.topicLabel.text = self.delegate.getRoomInfo.roomDesc.length > 0 ? self.delegate.getRoomInfo.roomDesc : YMLocalizedString(@"XPRoomFunctionContainerView12");
|
||||
}
|
||||
|
||||
- (void)topicGestureRecognizer:(UITapGestureRecognizer *)tap {
|
||||
@@ -1569,7 +1570,7 @@
|
||||
#pragma mark - 个播小时榜入口
|
||||
- (void)updateHourRankEntrance {
|
||||
|
||||
if (self.delegate.getRoomInfo.type == RoomType_Anchor || self.delegate.getRoomInfo.isPermitRoom == PermitRoomType_Licnese) {
|
||||
if (self.delegate.getRoomInfo.type == RoomType_Anchor || self.delegate.getRoomInfo.isPermitRoom == PermitRoomType_License) {
|
||||
self.hourRankEntranceView.hidden = NO;
|
||||
} else {
|
||||
self.hourRankEntranceView.hidden = YES;
|
||||
@@ -1816,18 +1817,19 @@
|
||||
return _fansTeamEntranceView;
|
||||
}
|
||||
|
||||
- (UIStackView *)topicStackView {
|
||||
if (!_topicStackView) {
|
||||
_topicStackView = [[UIStackView alloc] init];
|
||||
_topicStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_topicStackView.distribution = UIStackViewDistributionFill;
|
||||
_topicStackView.alignment = UIStackViewAlignmentFill;
|
||||
_topicStackView.spacing = 3;
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(topicGestureRecognizer:)];
|
||||
[_topicStackView addGestureRecognizer:tap];
|
||||
}
|
||||
return _topicStackView;
|
||||
}
|
||||
//- (UIStackView *)topicStackView {
|
||||
// if (!_topicStackView) {
|
||||
// _topicStackView = [[UIStackView alloc] init];
|
||||
// _topicStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
// _topicStackView.distribution = UIStackViewDistributionFill;
|
||||
// _topicStackView.alignment = UIStackViewAlignmentFill;
|
||||
// _topicStackView.spacing = 3;
|
||||
// UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(topicGestureRecognizer:)];
|
||||
// [_topicStackView addGestureRecognizer:tap];
|
||||
// _topicStackView.hidden = YES;
|
||||
// }
|
||||
// return _topicStackView;
|
||||
//}
|
||||
- (UIStackView *)rankStackView{
|
||||
if(!_rankStackView){
|
||||
_rankStackView = [[UIStackView alloc] init];
|
||||
@@ -1838,24 +1840,24 @@
|
||||
}
|
||||
return _rankStackView;
|
||||
}
|
||||
- (UILabel *)topicLabel {
|
||||
if (!_topicLabel) {
|
||||
_topicLabel = [[UILabel alloc] init];
|
||||
_topicLabel.font = [UIFont systemFontOfSize:12];
|
||||
_topicLabel.textColor = [UIColor whiteColor];
|
||||
}
|
||||
return _topicLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)editButton {
|
||||
if (!_editButton) {
|
||||
_editButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_editButton setImage:[UIImage imageNamed:@"room_postion_topic_edit"] forState:UIControlStateNormal];
|
||||
[_editButton setImage:[UIImage imageNamed:@"room_postion_topic_edit"] forState:UIControlStateSelected];
|
||||
_editButton.hidden = YES;
|
||||
}
|
||||
return _editButton;
|
||||
}
|
||||
//- (UILabel *)topicLabel {
|
||||
// if (!_topicLabel) {
|
||||
// _topicLabel = [[UILabel alloc] init];
|
||||
// _topicLabel.font = [UIFont systemFontOfSize:12];
|
||||
// _topicLabel.textColor = [UIColor whiteColor];
|
||||
// }
|
||||
// return _topicLabel;
|
||||
//}
|
||||
//
|
||||
//- (UIButton *)editButton {
|
||||
// if (!_editButton) {
|
||||
// _editButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
// [_editButton setImage:[UIImage imageNamed:@"room_postion_topic_edit"] forState:UIControlStateNormal];
|
||||
// [_editButton setImage:[UIImage imageNamed:@"room_postion_topic_edit"] forState:UIControlStateSelected];
|
||||
// _editButton.hidden = YES;
|
||||
// }
|
||||
// return _editButton;
|
||||
//}
|
||||
|
||||
- (XPAcrossRoomPKPanelView *)acrossPKPanelView {
|
||||
if (!_acrossPKPanelView) {
|
||||
|
@@ -119,12 +119,21 @@
|
||||
NIMChatroomMember * member = members.firstObject;
|
||||
BOOL isCreator = member.type == NIMChatroomMemberTypeCreator;
|
||||
BOOL isManager = member.type == NIMChatroomMemberTypeManager;
|
||||
if (isCreator && roomInfo.type != RoomType_MiniGame) {
|
||||
if (isCreator &&
|
||||
roomInfo.type != RoomType_MiniGame //&&
|
||||
// roomInfo.type != RoomType_10Mic &&
|
||||
// roomInfo.type != RoomType_15Mic
|
||||
) {
|
||||
if(roomInfo.type != RoomType_Anchor){
|
||||
[tempArray insertObject:[self createCrossRoomPKModel:roomInfo] atIndex:0];
|
||||
}
|
||||
}
|
||||
if ((isCreator || isManager || meIsSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
|
||||
if ((isCreator || isManager || meIsSuperAdmin) &&
|
||||
roomInfo.type != RoomType_MiniGame &&
|
||||
roomInfo.type != RoomType_Anchor //&&
|
||||
// roomInfo.type != RoomType_10Mic &&
|
||||
// roomInfo.type != RoomType_15Mic
|
||||
) {
|
||||
[tempArray insertObject:[self createRoomPKModel:roomInfo] atIndex:0];
|
||||
}
|
||||
}
|
||||
|
@@ -157,8 +157,9 @@
|
||||
}
|
||||
break;
|
||||
case XPRoomMenuItemType_More: {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"XP didTapForNewFunction"];
|
||||
[self.moreButton setImage:[UIImage imageNamed:@"room_menu_more"] forState:UIControlStateNormal];
|
||||
XPRoomMoreMenuViewController * moreMenuVC = [[XPRoomMoreMenuViewController alloc] initWithDelegate:self.delegate];
|
||||
|
||||
[self.delegate.getCurrentNav presentViewController:moreMenuVC animated:YES completion:nil];
|
||||
}
|
||||
break;
|
||||
@@ -231,7 +232,6 @@
|
||||
[self addSubview:self.svgDisplayView];
|
||||
[self addSubview:self.giftButton];
|
||||
|
||||
|
||||
[self.scrollView addSubview:self.stackView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.inputButton];
|
||||
@@ -242,7 +242,6 @@
|
||||
[self.stackView addArrangedSubview:self.messageButton];
|
||||
[self.stackView addArrangedSubview:self.moreButton];
|
||||
|
||||
|
||||
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;
|
||||
@@ -353,6 +352,21 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)updateMoreRedDotState {
|
||||
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
|
||||
if (roomInfo.uid == [[AccountInfoStorage instance].getUid integerValue] && // 房主
|
||||
roomInfo.isPermitRoom != PermitRoomType_License && // 普通
|
||||
(roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame)) { // 非個播 / 非小遊戲
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"XP didTapForNewFunction"]) {
|
||||
[self.moreButton setImage:[UIImage imageNamed:@"room_menu_more"] forState:UIControlStateNormal];
|
||||
} else {
|
||||
[self.moreButton setImage:[UIImage imageNamed:@"room_menu_more_red"] forState:UIControlStateNormal];
|
||||
}
|
||||
} else {
|
||||
[self.moreButton setImage:[UIImage imageNamed:@"room_menu_more"] forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
- (void)onMicroQueueUpdate:(NSMutableDictionary<NSString *,MicroQueueModel *> *)queue {
|
||||
MicroQueueModel * model = [self findMySelfMicro:queue];
|
||||
@@ -365,6 +379,8 @@
|
||||
self.micButton.hidden = YES;
|
||||
self.faceButton.hidden = YES;
|
||||
}
|
||||
|
||||
[self updateMoreRedDotState];
|
||||
}
|
||||
|
||||
- (void)onRoomEntered {
|
||||
@@ -403,6 +419,8 @@
|
||||
self.arrangeMicButton.hidden = YES;
|
||||
}];
|
||||
}
|
||||
|
||||
[self updateMoreRedDotState];
|
||||
}
|
||||
|
||||
- (void)handleNIMCustomMessage:(NIMMessage *)message {
|
||||
@@ -426,6 +444,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[self updateMoreRedDotState];
|
||||
}
|
||||
|
||||
- (void)handleNIMNotificationMessage:(NIMMessage *)message {
|
||||
@@ -560,9 +580,9 @@
|
||||
- (UIButton *)moreButton {
|
||||
if (!_moreButton) {
|
||||
_moreButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_moreButton setImage:[UIImage imageNamed:@"room_menu_more"] forState:UIControlStateNormal];
|
||||
[_moreButton setImage:[UIImage imageNamed:@"room_menu_more"] forState:UIControlStateSelected];
|
||||
_moreButton.imageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_moreButton.tag = XPRoomMenuItemType_More;
|
||||
[_moreButton setImage:[UIImage imageNamed:@"room_menu_more"] forState:UIControlStateNormal];
|
||||
[_moreButton addTarget:self action:@selector(menuButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _moreButton;
|
||||
|
@@ -58,6 +58,8 @@ typedef NS_ENUM(NSInteger, RoomMoreMenuType) {
|
||||
RoomMoreMenuType_Room_report = 23,
|
||||
///房间相册
|
||||
RoomMoreMenuType_Room_Room_Photo_Album = 24,
|
||||
/// 设置房间 mic 位类型
|
||||
RoomMoreMenuType_Room_Type_Setting = 25,
|
||||
};
|
||||
|
||||
@interface XPRoomMoreItemModel : PIBaseModel
|
||||
|
@@ -135,6 +135,11 @@
|
||||
roomPhotoAlbum.type = RoomMoreMenuType_Room_Room_Photo_Album;
|
||||
roomPhotoAlbum.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
||||
|
||||
XPRoomMoreItemModel * roomTypeSetting = [[XPRoomMoreItemModel alloc] init];
|
||||
roomTypeSetting.title = YMLocalizedString(@"XPMoreMenuPresenter25");
|
||||
roomTypeSetting.imageName = @"room_type_selection_icon";
|
||||
roomTypeSetting.type = RoomMoreMenuType_Room_Type_Setting;
|
||||
roomTypeSetting.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
||||
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
if (uid.length <= 0) {
|
||||
@@ -146,10 +151,12 @@
|
||||
request.userIds = @[uid];
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||
NSMutableArray * array = [NSMutableArray array];
|
||||
BOOL isCreator = NO;
|
||||
BOOL isManager = NO;
|
||||
if (error == nil) {
|
||||
NIMChatroomMember * member = members.firstObject;
|
||||
BOOL isCreator = member.type == NIMChatroomMemberTypeCreator;
|
||||
BOOL isManager = member.type == NIMChatroomMemberTypeManager;
|
||||
isCreator = member.type == NIMChatroomMemberTypeCreator;
|
||||
isManager = member.type == NIMChatroomMemberTypeManager;
|
||||
// if ((isCreator || isManager || isSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
|
||||
// [array addObject:roomPK];
|
||||
// }
|
||||
@@ -189,7 +196,17 @@
|
||||
}else{
|
||||
[array addObject:giftEffect];
|
||||
}
|
||||
|
||||
[array addObject:report];
|
||||
|
||||
if ((isCreator || isManager || isSuperAdmin) && // 房主 & 管理
|
||||
roomInfo.isPermitRoom != PermitRoomType_License && // 非牌照
|
||||
roomInfo.roomModeType != RoomModeType_Open_Blind && // 非相亲
|
||||
roomInfo.type != RoomType_MiniGame && // 非 10/15 麦
|
||||
roomInfo.type != RoomType_Anchor) {
|
||||
[array addObject:roomTypeSetting];
|
||||
}
|
||||
|
||||
if(roomInfo.hasRoomAlbum == YES){
|
||||
[array insertObject:roomPhotoAlbum atIndex:1];
|
||||
}
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#import "XPWebViewController.h"
|
||||
#import "PIRoomPhotoAlbumVC.h"
|
||||
#import "PIRoomSendRedPacketVC.h"
|
||||
#import "XPRoomTypeSelectionViewController.h"
|
||||
///P
|
||||
#import "XPMoreMenuPresenter.h"
|
||||
#import "XPMoreMenuProtocol.h"
|
||||
@@ -520,6 +521,13 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
PIRoomPhotoAlbumVC *albumVC = [PIRoomPhotoAlbumVC new];
|
||||
albumVC.roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid];
|
||||
[self.hostDelegate.getCurrentNav pushViewController:albumVC animated:YES];
|
||||
}
|
||||
break;
|
||||
case RoomMoreMenuType_Room_Type_Setting: {
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
XPRoomTypeSelectionViewController *micSelectionVC = [[XPRoomTypeSelectionViewController alloc] init];
|
||||
micSelectionVC.model = self.hostDelegate.getRoomInfo;
|
||||
[self.hostDelegate.getCurrentNav pushViewController:micSelectionVC animated:YES];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@@ -30,11 +30,15 @@
|
||||
#import "XPRoomRecommendModel.h"
|
||||
///View
|
||||
#import "XPShareView.h"
|
||||
#import "XPRoomTopicAlertView.h"
|
||||
#import "XPRoomRecommendView.h"
|
||||
///VC
|
||||
#import "XPWebViewcontroller.h"
|
||||
#import "XPRoomOnLineViewController.h"
|
||||
#import "XPRoomViewController.h"
|
||||
#import "XPRoomTypeSelectionViewController.h"
|
||||
#import "XPRoomTopicViewController.h"
|
||||
|
||||
|
||||
@interface RoomHeaderView ()<XCShareViewDelegate, XPRoomRecommendViewDelegate>
|
||||
///容器
|
||||
@@ -59,6 +63,8 @@
|
||||
@property (nonatomic,strong) UIButton *shareButton;
|
||||
///设置
|
||||
@property (nonatomic,strong) UIButton *settingButton;
|
||||
///话题设置
|
||||
@property (nonatomic, strong) UIButton *topicButton;
|
||||
///代理
|
||||
@property (nonatomic, weak) id<RoomHostDelegate> hostDelegate;
|
||||
///右侧推荐房间
|
||||
@@ -101,13 +107,16 @@
|
||||
FFPopupHorizontalLayout horizontalLayout = isMSRTL() ? FFPopupHorizontalLayout_Left : FFPopupHorizontalLayout_Right;
|
||||
FFPopupVerticalLayout verticalLayout = FFPopupVerticalLayout_Center;
|
||||
[popup showWithLayout:FFPopupLayoutMake(horizontalLayout, verticalLayout) duration:0.0];
|
||||
@kWeakify(self);
|
||||
popup.didFinishDismissingBlock = ^{
|
||||
@kStrongify(self);
|
||||
[self.recommendRoomView removeFromSuperview];
|
||||
};
|
||||
popup.didFinishShowingBlock = ^{
|
||||
|
||||
};
|
||||
[Api reqeustRecommendRoom:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
if (code == 200) {
|
||||
NSArray *array = [XPRoomRecommendModel modelsWithArray:data.data];
|
||||
self.recommendRoomView.roomList = [NSMutableArray arrayWithArray:array];
|
||||
@@ -115,6 +124,31 @@
|
||||
} roomId:[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId]];
|
||||
}
|
||||
|
||||
- (void)topicButtonAction:(UIButton *)sender {
|
||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||
request.roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||
request.userIds = @[[AccountInfoStorage instance].getUid];
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request
|
||||
completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||
if (error== nil) {
|
||||
NIMChatroomMember* member = members.firstObject;
|
||||
RoomInfoModel * roomInfo= self.hostDelegate.getRoomInfo;
|
||||
if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) {
|
||||
XPRoomTopicViewController * editTopicVC = [[XPRoomTopicViewController alloc] init];
|
||||
editTopicVC.roomInfo = roomInfo;
|
||||
[self.hostDelegate.getCurrentNav pushViewController:editTopicVC animated:YES];
|
||||
} else {
|
||||
TTPopupService * config = [[TTPopupService alloc] init];
|
||||
XPRoomTopicAlertView * alertView = [[XPRoomTopicAlertView alloc] init];
|
||||
alertView.title = roomInfo.roomDesc;
|
||||
alertView.message = roomInfo.introduction;
|
||||
config.contentView = alertView;
|
||||
[TTPopup popupWithConfig:config];
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
@@ -126,6 +160,7 @@
|
||||
|
||||
[self addSubview:self.shareButton];
|
||||
[self addSubview:self.settingButton];
|
||||
[self addSubview:self.topicButton];
|
||||
[self addSubview:self.backBtn];
|
||||
[self.nickStackView addArrangedSubview:self.titleStackView];
|
||||
[self.nickStackView addArrangedSubview:self.onlineStackView];
|
||||
@@ -146,6 +181,12 @@
|
||||
make.width.height.mas_equalTo(22);
|
||||
}];
|
||||
|
||||
[self.topicButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-45);
|
||||
make.bottom.mas_equalTo(-11);
|
||||
make.width.height.mas_equalTo(22);
|
||||
}];
|
||||
|
||||
[self.shareButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.equalTo(self.settingButton.mas_leading).offset(-15);
|
||||
make.centerY.mas_equalTo(self.settingButton);
|
||||
@@ -189,9 +230,9 @@
|
||||
}];
|
||||
|
||||
[self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(15);
|
||||
make.height.width.mas_equalTo(20);
|
||||
make.centerY.mas_equalTo(self.settingButton);
|
||||
make.leading.mas_equalTo(15);
|
||||
make.height.width.mas_equalTo(20);
|
||||
make.centerY.mas_equalTo(self.settingButton);
|
||||
}];
|
||||
|
||||
}
|
||||
@@ -211,6 +252,7 @@
|
||||
}
|
||||
self.lockRoomImageView.hidden = roomInfo.roomPwd.length <= 0;
|
||||
}
|
||||
self.topicButton.hidden = roomInfo.type == RoomType_Anchor;
|
||||
}
|
||||
|
||||
- (void)onRoomUpdate {
|
||||
@@ -226,6 +268,7 @@
|
||||
// self.collectButton.selected = roomInfo.isRoomFans; 收藏后,房间数据没有及时更新
|
||||
}
|
||||
self.lockRoomImageView.hidden = roomInfo.roomPwd.length <= 0;
|
||||
self.topicButton.hidden = roomInfo.type == RoomType_Anchor;
|
||||
}
|
||||
#pragma mark - Event Response
|
||||
- (void)showSharePanel {
|
||||
@@ -414,6 +457,16 @@
|
||||
return _settingButton;
|
||||
}
|
||||
|
||||
- (UIButton *)topicButton {
|
||||
if (!_topicButton) {
|
||||
_topicButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_topicButton setImage:[UIImage imageNamed:@"room_header_topic_icon"] forState:UIControlStateNormal];
|
||||
[_topicButton addTarget:self action:@selector(topicButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_topicButton setEnlargeEdgeWithTop:8 right:8 bottom:8 left:8];
|
||||
}
|
||||
return _topicButton;
|
||||
}
|
||||
|
||||
- (UIButton *)collectButton {
|
||||
if (!_collectButton) {
|
||||
_collectButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
@@ -515,9 +568,11 @@
|
||||
- (UIButton *)backBtn{
|
||||
if (!_backBtn){
|
||||
_backBtn = [UIButton new];
|
||||
[_backBtn setBackgroundImage:[[UIImage imageNamed:@"common_nav_back_white"]ms_SetImageForRTL] forState:UIControlStateNormal];
|
||||
[_backBtn setBackgroundImage:[[UIImage imageNamed:@"common_nav_back_white"] ms_SetImageForRTL] forState:UIControlStateNormal];
|
||||
[_backBtn addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_backBtn setCornerWithLeftTopCorner:10 rightTopCorner:10 bottomLeftCorner:10 bottomRightCorner:10 size:CGSizeMake(20,20)];
|
||||
// [_backBtn setCornerWithLeftTopCorner:10 rightTopCorner:10 bottomLeftCorner:10 bottomRightCorner:10 size:CGSizeMake(20,20)];
|
||||
[_backBtn setEnlargeEdgeWithTop:5 right:5 bottom:5 left:5];
|
||||
|
||||
}
|
||||
return _backBtn;
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(NSMutableArray *)getLittleGameList;
|
||||
|
||||
-(NSInteger)getPublicScreenType;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -100,7 +100,7 @@
|
||||
NIMChatroomMember * member = members.firstObject;
|
||||
if (roomInfo.type == RoomType_Anchor) {
|
||||
if (member.type == NIMChatroomMemberTypeCreator || isSuperAdmin) {
|
||||
if (roomInfo.isPermitRoom == PermitRoomType_Licnese) {
|
||||
if (roomInfo.isPermitRoom == PermitRoomType_License) {
|
||||
if (roomInfo.roomPwd.length > 0) {
|
||||
array = @[
|
||||
@[titleItem, lockItem, pwdItem],
|
||||
@@ -146,7 +146,7 @@
|
||||
}
|
||||
} else {
|
||||
if (member.type == NIMChatroomMemberTypeCreator) {
|
||||
if (roomInfo.isPermitRoom == PermitRoomType_Licnese) {
|
||||
if (roomInfo.isPermitRoom == PermitRoomType_License) {
|
||||
if (roomInfo.roomPwd.length > 0) {
|
||||
array = @[
|
||||
@[titleItem, lockItem,pwdItem],
|
||||
|
16
YuMi/Modules/YMRoom/View/StageView/FifteenMicStageView.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// FiftenMicStageView.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/25.
|
||||
//
|
||||
|
||||
#import "StageView.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface FifteenMicStageView : StageView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
89
YuMi/Modules/YMRoom/View/StageView/FifteenMicStageView.m
Normal file
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// FifteenMicStageView.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/25.
|
||||
//
|
||||
|
||||
#import "FifteenMicStageView.h"
|
||||
#import "ArabMicroView.h"
|
||||
//第一行距离顶部
|
||||
#define firstRowTopMargin 35
|
||||
// 房主头像宽 58 + 光圈 5
|
||||
//#define ownerWidth (45 + 5) * kScreenScale
|
||||
// 昵称高12,距离头像间距 10
|
||||
#define ownerHeight (ownerWidth + 10 + 12)
|
||||
// 下面 8 个坑位宽55 + 光圈 5
|
||||
#define mcWidth (45 + 5) * kScreenScale
|
||||
#define mcHeight (mcWidth + 10 + 12 + 5+16)
|
||||
// 左右 padding 20
|
||||
#define paddingH 22 * kScreenScale
|
||||
// 每行间距
|
||||
#define lineMargin 8
|
||||
// 下面 8 个坑位两两之间的间距
|
||||
#define marginH (KScreenWidth - paddingH * 2 - mcWidth * 5) / 4
|
||||
// 第二行坑位的顶部
|
||||
#define sRowTop firstRowTopMargin + mcHeight + lineMargin
|
||||
// 第一行坑位与第二行坑位的间距
|
||||
//#define marginV2 15
|
||||
// 第三行坑位的顶部
|
||||
#define tRowTop (sRowTop + mcHeight + lineMargin)
|
||||
@implementation FifteenMicStageView
|
||||
|
||||
- (NSInteger)countOfMicroView {
|
||||
return 15;
|
||||
}
|
||||
|
||||
- (UIView<MicroViewProtocol> *)microViewForIndex:(NSInteger)index {
|
||||
UIView<MicroViewProtocol> * microView = [super microViewForIndex:index];
|
||||
if (microView) {
|
||||
return microView;
|
||||
}
|
||||
return [[ArabMicroView alloc] init];
|
||||
}
|
||||
|
||||
- (CGRect)rectForViewAtIndex:(NSInteger)index {
|
||||
if (index >= 0 && index <= 4) {
|
||||
return CGRectMake(paddingH + (mcWidth + marginH) * (index), firstRowTopMargin, mcWidth, mcHeight);
|
||||
}
|
||||
|
||||
if (index >= 5 && index < 10) {
|
||||
return CGRectMake(paddingH + (mcWidth + marginH) * (index - 5), sRowTop, mcWidth, mcHeight);
|
||||
}
|
||||
|
||||
if (index >= 10 && index < 15) {
|
||||
return CGRectMake(paddingH + (mcWidth + marginH) * (index - 10), tRowTop, mcWidth, mcHeight);
|
||||
}
|
||||
|
||||
return [super rectForViewAtIndex:index];
|
||||
}
|
||||
|
||||
- (CGFloat)hightForStageView{
|
||||
return tRowTop + mcHeight + lineMargin;
|
||||
// return firstRowTopMargin + mcHeight + sRowTop + mcHeight + tRowTop + mcHeight + lineMargin;
|
||||
// return 3 * (lineMargin + mcHeight) + lineMargin;
|
||||
}
|
||||
|
||||
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
|
||||
// NSInteger index = [self getIndexByUid:uid];
|
||||
CGPoint point = CGPointZero;
|
||||
// if (index == -1 && self.hostDelegate.getRoomInfo.leaveMode && self.hostDelegate.getRoomInfo.uid == uid.integerValue) {
|
||||
// point = CGPointMake(KScreenWidth / 2, ownerWidth / 2 - 10 + ownerTopMargin);
|
||||
// }
|
||||
//
|
||||
// if (index == 0) {
|
||||
// point = CGPointMake(KScreenWidth / 2, ownerWidth / 2 - 10 + ownerTopMargin);
|
||||
// }
|
||||
//
|
||||
// if (index >= 1 && index <= 4) {
|
||||
// point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 1) + mcWidth / 2, firstRowTop + mcWidth / 2- 10);
|
||||
// }
|
||||
//
|
||||
// if (index >= 5 && index <= 9) {
|
||||
// point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 4 - 1) + mcWidth / 2, secondRowTop + mcWidth / 2 - 10);
|
||||
// }
|
||||
point = [self convertPoint:point toView:nil];
|
||||
return point;
|
||||
}
|
||||
|
||||
@end
|
16
YuMi/Modules/YMRoom/View/StageView/MicroView/ArabMicroView.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// ArabMicroView.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/26.
|
||||
//
|
||||
|
||||
#import "MicroView.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ArabMicroView : MicroView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
48
YuMi/Modules/YMRoom/View/StageView/MicroView/ArabMicroView.m
Normal file
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// ArabMicroView.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/26.
|
||||
//
|
||||
|
||||
#import "ArabMicroView.h"
|
||||
#import "ThemeColor+Room.h"
|
||||
#import "ClientConfig.h"
|
||||
|
||||
@interface ArabMicroView ()
|
||||
///当前坑位
|
||||
@property (nonatomic, assign) NSInteger position;
|
||||
|
||||
@end
|
||||
|
||||
@implementation ArabMicroView
|
||||
|
||||
- (void)configMicroView:(MicroQueueModel *)model {
|
||||
model.microState.indexOffset = 1;
|
||||
self.position = model.microState.position;
|
||||
[super configMicroView:model];
|
||||
MicroStateModel * micState = model.microState;
|
||||
|
||||
UIImage *image;
|
||||
if (micState.posState == MicroPosStateType_Free) {
|
||||
image = [UIImage imageNamed:@"room_position_normal"];
|
||||
} else {
|
||||
image = [UIImage imageNamed:@"room_position_lock"];
|
||||
}
|
||||
|
||||
CGSize scaledToSize = CGSizeMake(self.frame.size.width, self.frame.size.width);
|
||||
UIGraphicsBeginImageContextWithOptions(scaledToSize, false, 0.0);
|
||||
// 缩小 “1” 点儿,防止默认背景的边缘被裁减。
|
||||
[image drawInRect:CGRectMake(1, 1, scaledToSize.width - 2, scaledToSize.height - 2)];
|
||||
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
self.avatarImageView.backgroundColor = [UIColor colorWithPatternImage:newImage];
|
||||
}
|
||||
|
||||
- (void)configUser:(UserInfoModel *)userInfo {
|
||||
[super configUser:userInfo];
|
||||
self.stackView.axis = UILayoutConstraintAxisVertical;
|
||||
self.nickLabel.hidden = NO;
|
||||
}
|
||||
|
||||
@end
|
@@ -35,6 +35,7 @@
|
||||
}
|
||||
|
||||
- (void)configMicroView:(MicroQueueModel *)model {
|
||||
model.microState.indexOffset = 1;
|
||||
[super configMicroView:model];
|
||||
UserInfoModel * info = model.userInfo;
|
||||
self.stateButton.hidden = NO;
|
||||
|
@@ -363,7 +363,7 @@
|
||||
if (isHighLevel) {
|
||||
self.positionCharmImgView.image = [UIImage imageNamed:@"room_game_position_mine"];
|
||||
}else {
|
||||
self.positionCharmImgView.image = [UIImage imageNamed:@"room_game_position_crown"];
|
||||
self.positionCharmImgView.image = nil;//[UIImage imageNamed:@"room_game_position_crown"];
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -397,17 +397,23 @@
|
||||
image = [UIImage imageNamed:@"room_position_lock"];
|
||||
}
|
||||
CGSize scaledToSize = CGSizeMake(self.frame.size.width, self.frame.size.width);
|
||||
UIGraphicsBeginImageContextWithOptions(scaledToSize, false, 0.0);
|
||||
// 缩小 “1” 点儿,防止默认背景的边缘被裁减。
|
||||
[image drawInRect:CGRectMake(1, 1, scaledToSize.width - 2, scaledToSize.height - 2)];
|
||||
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
self.avatarImageView.backgroundColor = [UIColor colorWithPatternImage:newImage];
|
||||
if (scaledToSize.width > 0 && scaledToSize.height > 0 ) {
|
||||
UIGraphicsBeginImageContextWithOptions(scaledToSize, false, 0.0);
|
||||
// 缩小 “1” 点儿,防止默认背景的边缘被裁减。
|
||||
[image drawInRect:CGRectMake(1, 1, scaledToSize.width - 2, scaledToSize.height - 2)];
|
||||
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
self.avatarImageView.backgroundColor = [UIColor colorWithPatternImage:newImage];
|
||||
} else {
|
||||
self.avatarImageView.backgroundColor = [UIColor colorWithPatternImage:image];
|
||||
}
|
||||
|
||||
if (self.roomInfo.type == RoomType_Anchor || (self.roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode && self.roomInfo.roomId > 0) || (self.roomInfo.roomModeType == RoomModeType_Open_Blind && micState.position == 999)) {
|
||||
if (self.roomInfo.type == RoomType_Anchor ||
|
||||
(self.roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode && self.roomInfo.roomId > 0) ||
|
||||
(self.roomInfo.roomModeType == RoomModeType_Open_Blind && micState.position == 999)) {
|
||||
self.positionCharmImgView.hidden = YES;
|
||||
}
|
||||
self.nickLabel.text = [NSString stringWithFormat:@"%@%d",YMLocalizedString(@"MicroView0"), micState.position + 1];
|
||||
self.nickLabel.text = [NSString stringWithFormat:@"%@%ld",YMLocalizedString(@"MicroView0"), (long)(micState.position + 1 + micState.indexOffset)];
|
||||
}
|
||||
-(UserInfoModel *)getUser{
|
||||
return self.userInfo;
|
||||
@@ -415,7 +421,6 @@
|
||||
- (void)configUser:(UserInfoModel *)userInfo {
|
||||
self.userInfo = userInfo;
|
||||
|
||||
|
||||
self.nickLabel.hidden = NO;
|
||||
self.sexImageView.hidden = YES;
|
||||
self.forbidKickView.hidden = YES;
|
||||
|
@@ -21,8 +21,6 @@
|
||||
self.position = model.microState.position;
|
||||
[super configMicroView:model];
|
||||
MicroStateModel * micState = model.microState;
|
||||
UserInfoModel * userInfo = model.userInfo;
|
||||
|
||||
|
||||
UIImage *image;
|
||||
if (micState.posState == MicroPosStateType_Free) {
|
||||
|
@@ -36,6 +36,9 @@ typedef NS_ENUM(NSUInteger, DatingMicType) {
|
||||
@property (nonatomic, assign) MicroMicStateType micState;
|
||||
///相亲房的 男神女神位置的 1 男 2 女 本地字段
|
||||
@property (nonatomic,assign) DatingMicType datingMicType;
|
||||
|
||||
///坑位的序号的偏移量
|
||||
@property (nonatomic, assign) NSInteger indexOffset;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
16
YuMi/Modules/YMRoom/View/StageView/TenMicStageView.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TenMicStageView.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/25.
|
||||
//
|
||||
|
||||
#import "StageView.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TenMicStageView : StageView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
64
YuMi/Modules/YMRoom/View/StageView/TenMicStageView.m
Normal file
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// TenMicStageView.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/25.
|
||||
//
|
||||
|
||||
#import "TenMicStageView.h"
|
||||
#import "ArabMicroView.h"
|
||||
//第一行距离顶部
|
||||
#define firstRowTopMargin 35
|
||||
// 房主头像宽 58 + 光圈 5
|
||||
//#define ownerWidth (45 + 5) * kScreenScale
|
||||
// 昵称高12,距离头像间距 10
|
||||
#define ownerHeight (ownerWidth + 10 + 12)
|
||||
// 下面 8 个坑位宽55 + 光圈 5
|
||||
#define mcWidth (45 + 5) * kScreenScale
|
||||
#define mcHeight (mcWidth + 10 + 12 + 5+16)
|
||||
// 左右 padding 20
|
||||
#define paddingH 22 * kScreenScale
|
||||
// 每行间距
|
||||
#define lineMargin 8
|
||||
// 下面 8 个坑位两两之间的间距
|
||||
#define marginH (KScreenWidth - paddingH * 2 - mcWidth * 5) / 4
|
||||
// 第二行坑位的顶部
|
||||
#define sRowTop firstRowTopMargin + mcHeight + lineMargin
|
||||
// 第一行坑位与第二行坑位的间距
|
||||
//#define marginV2 15
|
||||
|
||||
@implementation TenMicStageView
|
||||
|
||||
- (NSInteger)countOfMicroView {
|
||||
return 10;
|
||||
}
|
||||
|
||||
- (UIView<MicroViewProtocol> *)microViewForIndex:(NSInteger)index {
|
||||
UIView<MicroViewProtocol> * microView = [super microViewForIndex:index];
|
||||
if (microView) {
|
||||
return microView;
|
||||
}
|
||||
ArabMicroView *v = [[ArabMicroView alloc] init];
|
||||
return v;
|
||||
}
|
||||
|
||||
- (CGRect)rectForViewAtIndex:(NSInteger)index {
|
||||
if (index >= 0 && index <= 4) {
|
||||
return CGRectMake(paddingH + (mcWidth + marginH) * (index), firstRowTopMargin, mcWidth, mcHeight);
|
||||
}
|
||||
|
||||
if (index >= 5 && index < 10) {
|
||||
return CGRectMake(paddingH + (mcWidth + marginH) * (index - 5), sRowTop, mcWidth, mcHeight);
|
||||
}
|
||||
|
||||
return [super rectForViewAtIndex:index];
|
||||
}
|
||||
|
||||
- (CGFloat)hightForStageView{
|
||||
return sRowTop + mcHeight + lineMargin;
|
||||
// return firstRowTopMargin + mcHeight + sRowTop + mcHeight + tRowTop + mcHeight + lineMargin;
|
||||
// return 3 * (lineMargin + mcHeight) + lineMargin;
|
||||
}
|
||||
|
||||
|
||||
@end
|
19
YuMi/Modules/YMRoom/View/XPRoomTypeSelectionViewController.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// XPRoomTypeSelectionViewController.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/25.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
@class RoomInfoModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomTypeSelectionViewController : MvpViewController
|
||||
|
||||
@property (nonatomic, strong) RoomInfoModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
311
YuMi/Modules/YMRoom/View/XPRoomTypeSelectionViewController.m
Normal file
@@ -0,0 +1,311 @@
|
||||
//
|
||||
// XPRoomTypeSelectionViewController.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/6/25.
|
||||
//
|
||||
|
||||
#import "XPRoomTypeSelectionViewController.h"
|
||||
#import "RoomInfoModel.h"
|
||||
#import "Api+RoomSetting.h"
|
||||
|
||||
@interface XPRoomTypeSelectionViewController ()
|
||||
|
||||
@property (nonatomic, assign) RoomType type;
|
||||
@property (nonatomic, assign) RoomType selectType;
|
||||
@property (nonatomic, strong) UIView *classMode;
|
||||
@property (nonatomic, strong) UIView *partyMode;
|
||||
@property (nonatomic, strong) UIView *feverMode;
|
||||
@property (nonatomic, assign) UIView *bottomArea;
|
||||
@property (nonatomic, strong) UIButton *confirmButton;
|
||||
@property (nonatomic, strong) UIImageView *selectedExampleImageView;
|
||||
@property (nonatomic, strong) UIImageView *selectionImageView;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPRoomTypeSelectionViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.title = YMLocalizedString(@"XPRoomTypeSelectionViewController4");
|
||||
[self setupUI];
|
||||
}
|
||||
|
||||
- (void)setModel:(RoomInfoModel *)model {
|
||||
_model = model;
|
||||
_type = model.type;
|
||||
_selectType = model.type;
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
if (self.type == RoomType_10Mic) {
|
||||
[self handleSelectMode:2];
|
||||
} else if (self.type == RoomType_15Mic) {
|
||||
[self handleSelectMode:3];
|
||||
} else {
|
||||
[self handleSelectMode:1];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupUI {
|
||||
self.view.backgroundColor = UIColorFromRGB(0xf8f8f8);
|
||||
|
||||
UIView *bottomArea = [[UIView alloc] init];
|
||||
bottomArea.backgroundColor = [UIColor whiteColor];
|
||||
[self.view addSubview: bottomArea];
|
||||
[bottomArea mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.left.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(202 + 48 + kSafeAreaBottomHeight + 44);
|
||||
}];
|
||||
_bottomArea = bottomArea;
|
||||
|
||||
UIView *classMode = [self viewMode:1];
|
||||
[bottomArea addSubview:classMode];
|
||||
[classMode mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(bottomArea).offset(16);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(bottomArea).offset(-40);
|
||||
} else {
|
||||
make.left.mas_equalTo(bottomArea).offset(40);
|
||||
}
|
||||
make.size.mas_equalTo(CGSizeMake(80, 142 + 6 + 28));
|
||||
}];
|
||||
_classMode = classMode;
|
||||
|
||||
UIView *partyMode = [self viewMode:2];
|
||||
[bottomArea addSubview:partyMode];
|
||||
[partyMode mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(bottomArea).offset(16);
|
||||
make.centerX.mas_equalTo(bottomArea);
|
||||
make.size.mas_equalTo(CGSizeMake(80, 142 + 6 + 28));
|
||||
}];
|
||||
_partyMode = partyMode;
|
||||
|
||||
UIView *feverMode = [self viewMode:3];
|
||||
[bottomArea addSubview:feverMode];
|
||||
[feverMode mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(bottomArea).offset(16);
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(bottomArea).offset(40);
|
||||
} else {
|
||||
make.right.mas_equalTo(bottomArea).offset(-40);
|
||||
}
|
||||
make.size.mas_equalTo(CGSizeMake(80, 142 + 6 + 28));
|
||||
}];
|
||||
_feverMode = feverMode;
|
||||
|
||||
[bottomArea addSubview:self.confirmButton];
|
||||
[self.confirmButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(partyMode.mas_bottom).offset(27);
|
||||
make.centerX.mas_equalTo(bottomArea);
|
||||
make.width.mas_equalTo(KScreenWidth - 36);
|
||||
make.height.mas_equalTo(48);
|
||||
}];
|
||||
|
||||
[bottomArea addSubview:self.selectionImageView];
|
||||
[self.selectionImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(bottomArea).offset(16);
|
||||
make.left.mas_equalTo(bottomArea).offset(40);
|
||||
make.size.mas_equalTo(CGSizeMake(80, 142));
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.selectedExampleImageView];
|
||||
[self.selectedExampleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(0);
|
||||
make.bottom.mas_equalTo(bottomArea.mas_top);
|
||||
make.top.left.right.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)confirmButtonAction:(UIButton *)sender {
|
||||
BOOL isSameType = self.selectType == self.type;
|
||||
if (isSameType) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.selectType < self.type) {
|
||||
@kWeakify(self);
|
||||
[TTPopup alertWithMessage:YMLocalizedString(@"XPRoomTypeSelectionViewController3")
|
||||
confirmHandler:^{
|
||||
@kStrongify(self);
|
||||
[self changeMicSetting];
|
||||
} cancelHandler:^{}];
|
||||
} else {
|
||||
[self changeMicSetting];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)changeMicSetting {
|
||||
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
[params setObject:ticket forKey:@"ticket"];
|
||||
[params setObject:@(self.model.uid).stringValue forKey:@"uid"];
|
||||
[params setObject:[NSString stringWithFormat:@"%ld", self.model.uid] forKey:@"roomUid"];
|
||||
if (self.model.title.length > 0) {
|
||||
[params setObject:self.model.title forKey:@"title"];
|
||||
}
|
||||
|
||||
if (self.model.roomPwd.length > 0) {
|
||||
[params setObject:self.model.roomPwd forKey:@"roomPwd"];
|
||||
} else{
|
||||
[params setObject:@"" forKey:@"roomPwd"];
|
||||
}
|
||||
|
||||
if (self.model.tagId > 0) {
|
||||
[params setObject:[NSString stringWithFormat:@"%ld", self.model.tagId] forKey:@"tagId"];
|
||||
}
|
||||
|
||||
[params setObject:@(self.selectType) forKey:@"type"];
|
||||
[params setObject:@"0" forKey:@"mgId"];
|
||||
[params setObject:@(self.model.hasAnimationEffect) forKey:@"hasAnimationEffect"];
|
||||
|
||||
[XNDJTDDLoadingTool showLoading];
|
||||
@kWeakify(self);
|
||||
[Api ownerUpdateRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
if (code == 200) {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
[XNDJTDDLoadingTool hideHUD];
|
||||
} else {
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:msg];
|
||||
}
|
||||
} params:params];
|
||||
}
|
||||
|
||||
- (void)selectModeAction:(UIPanGestureRecognizer *)recognizer {
|
||||
UIView *targetView = recognizer.view;
|
||||
[self handleSelectMode:targetView.tag];
|
||||
}
|
||||
|
||||
- (void)handleSelectMode:(NSInteger)type {
|
||||
switch (type) {
|
||||
case 1: {
|
||||
self.selectType = RoomType_Game;
|
||||
self.selectedExampleImageView.image = [UIImage imageNamed:@"room_type_example_9"];
|
||||
[self.selectionImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.bottomArea).offset(16);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.bottomArea).offset(-40);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.bottomArea).offset(40);
|
||||
}
|
||||
make.size.mas_equalTo(CGSizeMake(80, 142));
|
||||
}];
|
||||
}
|
||||
break;
|
||||
case 2: {
|
||||
self.selectType = RoomType_10Mic;
|
||||
self.selectedExampleImageView.image = [UIImage imageNamed:@"room_type_example_10"];
|
||||
[self.selectionImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.bottomArea).offset(16);
|
||||
make.centerX.mas_equalTo(self.bottomArea);
|
||||
make.size.mas_equalTo(CGSizeMake(80, 142));
|
||||
}];
|
||||
}
|
||||
break;
|
||||
case 3: {
|
||||
self.selectType = RoomType_15Mic;
|
||||
self.selectedExampleImageView.image = [UIImage imageNamed:@"room_type_example_15"];
|
||||
[self.selectionImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.bottomArea).offset(16);
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(self.bottomArea).offset(40);
|
||||
} else {
|
||||
make.right.mas_equalTo(self.bottomArea).offset(-40);
|
||||
}
|
||||
make.size.mas_equalTo(CGSizeMake(80, 142));
|
||||
}];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
BOOL isSameType = self.selectType == self.type;
|
||||
[self.confirmButton setTitle:isSameType ? YMLocalizedString(@"XPRoomTypeSelectionViewController5") : YMLocalizedString(@"XPMineDressBubbleCollectionViewCell4")
|
||||
forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (UIImageView *)selectedExampleImageView {
|
||||
if (!_selectedExampleImageView) {
|
||||
_selectedExampleImageView = [[UIImageView alloc] init];
|
||||
_selectedExampleImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _selectedExampleImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)selectionImageView {
|
||||
if (!_selectionImageView) {
|
||||
_selectionImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_type_selection_frame"]];
|
||||
_selectionImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _selectionImageView;
|
||||
}
|
||||
|
||||
- (UIButton *)confirmButton {
|
||||
if (!_confirmButton) {
|
||||
_confirmButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_confirmButton.adjustsImageWhenHighlighted = NO;
|
||||
[_confirmButton setTitle:YMLocalizedString(@"MSRoomSetingBackdropCell0") forState:UIControlStateNormal];
|
||||
[_confirmButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_confirmButton.titleLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightHeavy];
|
||||
[_confirmButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x57e193), UIColorFromRGB(0x14d2a6)]
|
||||
gradientType:GradientTypeLeftToRight
|
||||
imgSize:CGSizeMake(10, 10)]
|
||||
forState:UIControlStateNormal];
|
||||
_confirmButton.layer.masksToBounds = YES;
|
||||
_confirmButton.layer.cornerRadius = 24;
|
||||
[_confirmButton addTarget:self action:@selector(confirmButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _confirmButton;
|
||||
}
|
||||
|
||||
- (UIView *)viewMode:(NSInteger)type {
|
||||
UIView *targetView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 80, 142 + 6 + 28)];
|
||||
targetView.tag = type;
|
||||
|
||||
NSString *imageName = @"";
|
||||
NSString *title = @"";
|
||||
switch (type) {
|
||||
case 1:
|
||||
title = YMLocalizedString(@"XPRoomTypeSelectionViewController0");
|
||||
imageName = @"room_type_example_mini_9";
|
||||
break;
|
||||
case 2:
|
||||
title = YMLocalizedString(@"XPRoomTypeSelectionViewController1");
|
||||
imageName = @"room_type_example_mini_10";
|
||||
break;
|
||||
case 3:
|
||||
title = YMLocalizedString(@"XPRoomTypeSelectionViewController2");
|
||||
imageName = @"room_type_example_mini_15";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
UIImageView *exampleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]];
|
||||
[targetView addSubview:exampleImageView];
|
||||
[exampleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.left.right.mas_equalTo(targetView);
|
||||
make.height.mas_equalTo(142);
|
||||
}];
|
||||
|
||||
UILabel *titleLabel = [UILabel labelInitWithText:title
|
||||
font:[UIFont systemFontOfSize:12 weight:UIFontWeightBold]
|
||||
textColor:UIColorFromRGB(0x1a1a1a)];
|
||||
[targetView addSubview:titleLabel];
|
||||
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(exampleImageView.mas_bottom).offset(6);
|
||||
make.centerX.mas_equalTo(targetView);
|
||||
}];
|
||||
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(selectModeAction:)];
|
||||
[targetView addGestureRecognizer:tap];
|
||||
|
||||
return targetView;
|
||||
}
|
||||
|
||||
@end
|
@@ -48,6 +48,8 @@
|
||||
#import "MsRoomMessageMainView.h"
|
||||
#import "RoomHeaderView.h"
|
||||
#import "SocialStageView.h"
|
||||
#import "TenMicStageView.h"
|
||||
#import "FifteenMicStageView.h"
|
||||
#import "DatingStageView.h"
|
||||
#import "AnchorStageView.h"
|
||||
#import "AnchorPkStageView.h"
|
||||
@@ -103,6 +105,8 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
@property (nonatomic,strong) RoomHeaderView *roomHeaderView;
|
||||
///坑位信息
|
||||
@property (nonatomic,strong) StageView *stageView;
|
||||
@property (nonatomic,strong) TenMicStageView *tenMicStageView;
|
||||
@property (nonatomic,strong) FifteenMicStageView *fifteenMicStageView;
|
||||
///公屏
|
||||
@property (nonatomic,strong) MsRoomMessageMainView *messageContainerView;
|
||||
///快捷发言
|
||||
@@ -324,10 +328,11 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
[[NIMSDK sharedSDK].broadcastManager addDelegate:self];
|
||||
[CountDownHelper shareHelper].delegate = self;
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myGiftEffectUpdate:) name:kRoomGiftEffectUpdateNotificationKey object:nil];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(showRoomFirstChargeWindowFormNot:) name:kShowFirstRechargeView object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showRoomFirstChargeWindowFormNot:) name:kShowFirstRechargeView object:nil];
|
||||
[XPSkillCardPlayerManager shareInstance].isInRoom = YES;
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(openRedPacketNotification:) name:@"kOpenRedPacketNotification" object:nil];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(showSendheadlineView:) name:@"kShowSendheadlineView" object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(openRedPacketNotification:) name:@"kOpenRedPacketNotification" object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showSendheadlineView:) name:@"kShowSendheadlineView" object:nil];
|
||||
|
||||
[self addTimer];
|
||||
}
|
||||
|
||||
@@ -374,7 +379,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
NSString *scrolling = redPacketDic[@"scrolling"];
|
||||
[self.menuContainerView showInputView:scrolling];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||
@@ -424,6 +428,22 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
[self.view addSubview:self.animationView];
|
||||
}
|
||||
|
||||
- (void)__layoutFifteenMicStage {
|
||||
[self.stageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.roomHeaderView.mas_bottom);
|
||||
make.height.mas_equalTo(self.stageView.hightForStageView);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)__layoutTenMicStage {
|
||||
[self.stageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.roomHeaderView.mas_bottom);
|
||||
make.height.mas_equalTo(self.stageView.hightForStageView);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
@@ -622,7 +642,19 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
[self.stageView removeFromSuperview];
|
||||
self.stageView = nil;
|
||||
self.stageView = [[LittleGameScrollStageView alloc] initWithDelegate:self];
|
||||
}else if(self.roomInfo.hadChangeRoomType && ![self.stageView isKindOfClass:[SocialStageView class]]) {
|
||||
}
|
||||
|
||||
else if(self.roomInfo.type == RoomType_15Mic) {
|
||||
[self.stageView removeFromSuperview];
|
||||
self.stageView = nil;
|
||||
self.stageView = [[FifteenMicStageView alloc] initWithDelegate:self];
|
||||
}else if(self.roomInfo.type == RoomType_10Mic) {
|
||||
[self.stageView removeFromSuperview];
|
||||
self.stageView = nil;
|
||||
self.stageView = [[TenMicStageView alloc] initWithDelegate:self];
|
||||
}
|
||||
|
||||
else if(self.roomInfo.hadChangeRoomType && ![self.stageView isKindOfClass:[SocialStageView class]]) {
|
||||
[self.stageView removeFromSuperview];
|
||||
self.stageView = nil;
|
||||
self.stageView = [[SocialStageView alloc] initWithDelegate:self];
|
||||
@@ -791,7 +823,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
- (void)exitLittleGame {
|
||||
RoomInfoModel * roomInfo = self.getRoomInfo;
|
||||
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
[params setObject:ticket forKey:@"ticket"];
|
||||
[params setObject:@(roomInfo.uid).stringValue forKey:@"uid"];
|
||||
@@ -810,7 +841,10 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
|
||||
}
|
||||
|
||||
[params setObject:@(RoomType_Game) forKey:@"type"];
|
||||
if (self.roomInfo.oldType == 0) {
|
||||
self.roomInfo.oldType = RoomType_Game;
|
||||
}
|
||||
[params setObject:@(self.roomInfo.oldType) forKey:@"type"];
|
||||
[params setObject:@"0" forKey:@"mgId"];
|
||||
[params setObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"];
|
||||
|
||||
@@ -1619,6 +1653,14 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
} else {
|
||||
if (self.roomInfo.type == RoomType_Anchor) {
|
||||
[self changeStageViewOnAnchorRoom];
|
||||
} else if (self.roomInfo.type == RoomType_15Mic) {
|
||||
[self __layoutFifteenMicStage];
|
||||
[self changeStageViewOnRoomUpdate];
|
||||
[self.fifteenMicStageView onRoomUpdate];
|
||||
} else if (self.roomInfo.type == RoomType_10Mic) {
|
||||
[self __layoutTenMicStage];
|
||||
[self changeStageViewOnRoomUpdate];
|
||||
[self.tenMicStageView onRoomUpdate];
|
||||
} else {
|
||||
[self changeStageViewOnRoomUpdate];
|
||||
}
|
||||
@@ -1701,8 +1743,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
self.userInfo.isFirstCharge = NO;
|
||||
[self.menuContainerView onRoomUpdate];
|
||||
[self.activityContainerView onRoomUpdate];
|
||||
|
||||
|
||||
} else if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState) {
|
||||
///兼容安卓和iOS 协议不同的问题
|
||||
NSDictionary * dic= attachment.data[@"roomInfo"];
|
||||
@@ -1871,7 +1911,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
message.messageObject = object;
|
||||
|
||||
[self.messageContainerView handleNIMTextMessage:message];
|
||||
|
||||
}
|
||||
}
|
||||
//发送消息成功回调
|
||||
@@ -2422,6 +2461,21 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
}
|
||||
return _stageView;
|
||||
}
|
||||
|
||||
- (TenMicStageView *)tenMicStageView {
|
||||
if (!_tenMicStageView) {
|
||||
_tenMicStageView = [[TenMicStageView alloc] initWithDelegate:self];
|
||||
}
|
||||
return _tenMicStageView;
|
||||
}
|
||||
|
||||
- (FifteenMicStageView *)fifteenMicStageView {
|
||||
if (!_fifteenMicStageView) {
|
||||
_fifteenMicStageView = [[FifteenMicStageView alloc] initWithDelegate:self];
|
||||
}
|
||||
return _fifteenMicStageView;
|
||||
}
|
||||
|
||||
- (XPRoomLittleGameContainerView *)littleGameView {
|
||||
if (!_littleGameView) {
|
||||
_littleGameView = [[XPRoomLittleGameContainerView alloc] initWithDelegate:self];
|
||||
|
@@ -36,22 +36,18 @@ static CGFloat kdeafultFrameDurations = 0.066;
|
||||
[self.operationImageView sd_setImageWithURL:url completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
|
||||
@kStrongify(self);
|
||||
if (error) {
|
||||
if (![self.retryCache objectForKey:key]) {
|
||||
[self.retryCache setObject:@(0) forKey:key];
|
||||
}
|
||||
[self.retryCache setObject:@([[self.retryCache objectForKey:key] integerValue] + 1) forKey:key];
|
||||
if ([[self.retryCache objectForKey:key] integerValue] < retryCount) {
|
||||
[self retryWithKey:key completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
|
||||
completionBlock(sprit);
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
failureBlock(error);
|
||||
|
||||
if (error) {
|
||||
if (![self.retryCache objectForKey:key]) {
|
||||
[self.retryCache setObject:@(0) forKey:key];
|
||||
}
|
||||
[self.retryCache setObject:@([[self.retryCache objectForKey:key] integerValue] + 1) forKey:key];
|
||||
if ([[self.retryCache objectForKey:key] integerValue] < retryCount) {
|
||||
[self retryWithKey:key completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
|
||||
completionBlock(sprit);
|
||||
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
failureBlock(error);
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
|
@@ -401,7 +401,8 @@
|
||||
"XPSessionHelloEnterView1" = "قل مرحبًا";
|
||||
|
||||
"XPSessionListHeadFriendCell0" = "حيّ";
|
||||
|
||||
"XPMineDataGiftTableViewCell1" = "هدايا الحظ";
|
||||
"XPMineDataGiftTableViewCell2" = "ميدالية";
|
||||
|
||||
"NIMTimeUtils1" = "أمس";
|
||||
"NIMTimeUtils3" = "قبل يومين";
|
||||
@@ -1014,6 +1015,7 @@ ineHeadView12" = "الحمل";
|
||||
"XPMineUserInfoHeaderView3" = "يبث الآن";
|
||||
"XPMineUserInfoHeaderView4" = "تسجيل بطاقة صوتية";
|
||||
"XPMineUserInfoHeaderView5" = "أنا عبارة افتراضية";
|
||||
"XPMineUserInfoHeaderView6" = "هذا المستخدم لم يترك شيئا وراءه~";
|
||||
///XPMineUserInfoIndividualTagView
|
||||
"XPMineUserInfoIndividualTagView0"="علاماته";
|
||||
"XPMineUserInfoIndividualTagView1"="علاماتي";
|
||||
@@ -1074,7 +1076,8 @@ ineHeadView12" = "الحمل";
|
||||
"XPMineUserInfoGiftWallViewController0" = "الهدايا";
|
||||
"XPMineUserInfoGiftWallViewController1" = "الهدايا العادية";
|
||||
"XPMineUserInfoGiftWallViewController2" = "هدايا الحظ";
|
||||
|
||||
"XPMineUserInfoGiftWallViewController3" = "لا توجد صور بعد";
|
||||
"XPMineUserInfoGiftWallViewController4" = "لا توجد هدايا بعد";
|
||||
|
||||
"XPMineUserInfoTableViewCell1" = "أنا عبارة افتراضية";
|
||||
"XPMineUserInfoTableViewCell2" = "يبث الآن";
|
||||
@@ -1761,6 +1764,7 @@ ineHeadView12" = "الحمل";
|
||||
"XPMoreMenuPresenter22" = "دعوة المعجبين";
|
||||
"XPMoreMenuPresenter23" = "إرسال البث المباشر";
|
||||
"XPMoreMenuPresenter24" = "الحزم الحمراء";
|
||||
"XPMoreMenuPresenter25" = "نوع الغرفة";
|
||||
|
||||
"XPMoreMenuPresenter26" = "جاري البطولة...";
|
||||
"XPMoreMenuPresenter27" = "إخفاء قيمة الهدايا";
|
||||
@@ -3841,3 +3845,10 @@ ineHeadView12" = "الحمل";
|
||||
//MSRoomMenuGameVC
|
||||
"MSRoomMenuGameVC0"="تأكيد لبدء اللعبة؟";
|
||||
"MSRoomMenuGameVC1"="ليس لديك إذن بتشغيل هذه اللعبة، يرجى التواصل بصاحب أومشرف الغرفة ~";
|
||||
|
||||
"XPRoomTypeSelectionViewController0" = "كلاسيكي";
|
||||
"XPRoomTypeSelectionViewController1" = "الاجتماع معا";
|
||||
"XPRoomTypeSelectionViewController2" = "كرنفال صاخب";
|
||||
"XPRoomTypeSelectionViewController3" = "بعد الإعداد، ستتم إزالة الأعضاء الذين يتجاوزون خارج الترتيب علي المايك ؛ هل تريد تأكيد الإعداد ؟";
|
||||
"XPRoomTypeSelectionViewController4" = "نوع الغرفة";
|
||||
"XPRoomTypeSelectionViewController5" = "قيد الاستخدام";
|
||||
|