Compare commits
6 Commits
hotfix/Sen
...
1.0.31
Author | SHA1 | Date | |
---|---|---|---|
![]() |
83d1a1df95 | ||
![]() |
75a9bac88a | ||
![]() |
c0e7e7ff83 | ||
![]() |
47c0f141a8 | ||
![]() |
a0b2dea116 | ||
![]() |
e82939f767 |
@@ -497,6 +497,8 @@
|
||||
23FF42792AA6E19C0055733C /* HomeMenuSourceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF42782AA6E19C0055733C /* HomeMenuSourceModel.m */; };
|
||||
23FF428E2AAB2D3A0055733C /* XPCandyTreeBuyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF428D2AAB2D3A0055733C /* XPCandyTreeBuyView.m */; };
|
||||
4C1892992CF84349004D4426 /* RoomCahtCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1892982CF84349004D4426 /* RoomCahtCell.m */; };
|
||||
4C5C37232D0C1C7900BA9AB8 /* RegionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5C37222D0C1C7900BA9AB8 /* RegionListViewController.m */; };
|
||||
4C6C92C02D1172D9000A4693 /* RegionListInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C6C92BF2D1172D9000A4693 /* RegionListInfo.m */; };
|
||||
4C6E1F752CEAEC3C0073D0A3 /* ShoppingMallTagView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C6E1F742CEAEC3C0073D0A3 /* ShoppingMallTagView.m */; };
|
||||
4C6E1F792CEB12780073D0A3 /* UIView+GradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C6E1F782CEB12780073D0A3 /* UIView+GradientLayer.m */; };
|
||||
4C6E1F7C2CEB25B10073D0A3 /* ShoppingMallItemPreview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C6E1F7B2CEB25B10073D0A3 /* ShoppingMallItemPreview.m */; };
|
||||
@@ -505,6 +507,11 @@
|
||||
4C815A172CFEB758002A46A6 /* SuperBlockViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C815A162CFEB758002A46A6 /* SuperBlockViewController.m */; };
|
||||
4CC6195A2CEC7770008C1EE8 /* MyDressingDataPresent.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC619592CEC7770008C1EE8 /* MyDressingDataPresent.m */; };
|
||||
4CC6195D2CEC996E008C1EE8 /* MyDressingDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6195C2CEC996E008C1EE8 /* MyDressingDataModel.m */; };
|
||||
4CEB9EA72D09643E00443480 /* UserRoomCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EA62D09643E00443480 /* UserRoomCardViewController.m */; };
|
||||
4CEB9EAA2D097E8400443480 /* MoliAvatar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EA92D097E8400443480 /* MoliAvatar.m */; };
|
||||
4CEB9EAD2D09AA0400443480 /* SexAgeLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EAC2D09AA0400443480 /* SexAgeLabel.m */; };
|
||||
4CEB9EB02D0AF4FE00443480 /* TwentyMicStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EAF2D0AF4FE00443480 /* TwentyMicStageView.m */; };
|
||||
4CEB9EB32D0AFCE200443480 /* NineteenMicStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EB22D0AFCE200443480 /* NineteenMicStageView.m */; };
|
||||
540EC1D02C89925F00F3BF0D /* GiftComboView.m in Sources */ = {isa = PBXBuildFile; fileRef = 540EC1CF2C89925F00F3BF0D /* GiftComboView.m */; };
|
||||
540EC1D32C89998500F3BF0D /* GiftComboManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 540EC1D22C89998500F3BF0D /* GiftComboManager.m */; };
|
||||
5412E0F42C4E460300FDD668 /* XPMineCenterAgencyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5412E0F32C4E460300FDD668 /* XPMineCenterAgencyView.m */; };
|
||||
@@ -2584,6 +2591,10 @@
|
||||
23FF428D2AAB2D3A0055733C /* XPCandyTreeBuyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeBuyView.m; sourceTree = "<group>"; };
|
||||
4C1892972CF84349004D4426 /* RoomCahtCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomCahtCell.h; sourceTree = "<group>"; };
|
||||
4C1892982CF84349004D4426 /* RoomCahtCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomCahtCell.m; sourceTree = "<group>"; };
|
||||
4C5C37212D0C1C7900BA9AB8 /* RegionListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RegionListViewController.h; sourceTree = "<group>"; };
|
||||
4C5C37222D0C1C7900BA9AB8 /* RegionListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RegionListViewController.m; sourceTree = "<group>"; };
|
||||
4C6C92BE2D1172D9000A4693 /* RegionListInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RegionListInfo.h; sourceTree = "<group>"; };
|
||||
4C6C92BF2D1172D9000A4693 /* RegionListInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RegionListInfo.m; sourceTree = "<group>"; };
|
||||
4C6E1F732CEAEC3C0073D0A3 /* ShoppingMallTagView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShoppingMallTagView.h; sourceTree = "<group>"; };
|
||||
4C6E1F742CEAEC3C0073D0A3 /* ShoppingMallTagView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShoppingMallTagView.m; sourceTree = "<group>"; };
|
||||
4C6E1F772CEB12780073D0A3 /* UIView+GradientLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+GradientLayer.h"; sourceTree = "<group>"; };
|
||||
@@ -2600,6 +2611,16 @@
|
||||
4CC619592CEC7770008C1EE8 /* MyDressingDataPresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDressingDataPresent.m; sourceTree = "<group>"; };
|
||||
4CC6195B2CEC996E008C1EE8 /* MyDressingDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDressingDataModel.h; sourceTree = "<group>"; };
|
||||
4CC6195C2CEC996E008C1EE8 /* MyDressingDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDressingDataModel.m; sourceTree = "<group>"; };
|
||||
4CEB9EA52D09643E00443480 /* UserRoomCardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserRoomCardViewController.h; sourceTree = "<group>"; };
|
||||
4CEB9EA62D09643E00443480 /* UserRoomCardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserRoomCardViewController.m; sourceTree = "<group>"; };
|
||||
4CEB9EA82D097E8400443480 /* MoliAvatar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MoliAvatar.h; sourceTree = "<group>"; };
|
||||
4CEB9EA92D097E8400443480 /* MoliAvatar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MoliAvatar.m; sourceTree = "<group>"; };
|
||||
4CEB9EAB2D09AA0400443480 /* SexAgeLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SexAgeLabel.h; sourceTree = "<group>"; };
|
||||
4CEB9EAC2D09AA0400443480 /* SexAgeLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SexAgeLabel.m; sourceTree = "<group>"; };
|
||||
4CEB9EAE2D0AF4FE00443480 /* TwentyMicStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TwentyMicStageView.h; sourceTree = "<group>"; };
|
||||
4CEB9EAF2D0AF4FE00443480 /* TwentyMicStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TwentyMicStageView.m; sourceTree = "<group>"; };
|
||||
4CEB9EB12D0AFCE200443480 /* NineteenMicStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NineteenMicStageView.h; sourceTree = "<group>"; };
|
||||
4CEB9EB22D0AFCE200443480 /* NineteenMicStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NineteenMicStageView.m; sourceTree = "<group>"; };
|
||||
540EC1CE2C89925F00F3BF0D /* GiftComboView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftComboView.h; sourceTree = "<group>"; };
|
||||
540EC1CF2C89925F00F3BF0D /* GiftComboView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiftComboView.m; sourceTree = "<group>"; };
|
||||
540EC1D12C89998500F3BF0D /* GiftComboManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftComboManager.h; sourceTree = "<group>"; };
|
||||
@@ -5197,6 +5218,10 @@
|
||||
189DD68226E1FDBB00AB55B1 /* XNDJTDDLoadingTool.m */,
|
||||
E8B825CB26EA18C8009E8E9F /* DJDKMIMOMColor.h */,
|
||||
E8B825CC26EA18C8009E8E9F /* DJDKMIMOMColor.m */,
|
||||
4CEB9EA82D097E8400443480 /* MoliAvatar.h */,
|
||||
4CEB9EA92D097E8400443480 /* MoliAvatar.m */,
|
||||
4CEB9EAB2D09AA0400443480 /* SexAgeLabel.h */,
|
||||
4CEB9EAC2D09AA0400443480 /* SexAgeLabel.m */,
|
||||
);
|
||||
path = CustomUI;
|
||||
sourceTree = "<group>";
|
||||
@@ -5221,6 +5246,8 @@
|
||||
E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */,
|
||||
23B2AEC32A6516C200543D17 /* LoginForgetPasswordViewController.h */,
|
||||
23B2AEC22A6516C200543D17 /* LoginForgetPasswordViewController.m */,
|
||||
4C5C37212D0C1C7900BA9AB8 /* RegionListViewController.h */,
|
||||
4C5C37222D0C1C7900BA9AB8 /* RegionListViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -8167,6 +8194,8 @@
|
||||
E82325FD274E48D0003A3332 /* Cell */,
|
||||
E82325F0274E2DE6003A3332 /* XPUserCardViewController.h */,
|
||||
E82325F1274E2DE6003A3332 /* XPUserCardViewController.m */,
|
||||
4CEB9EA52D09643E00443480 /* UserRoomCardViewController.h */,
|
||||
4CEB9EA62D09643E00443480 /* UserRoomCardViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -10599,6 +10628,10 @@
|
||||
236B2E512AA08756003967A8 /* LittleGameScrollStageView.m */,
|
||||
236B2E522AA08757003967A8 /* LittleGameStageView.h */,
|
||||
236B2E502AA08756003967A8 /* LittleGameStageView.m */,
|
||||
4CEB9EAE2D0AF4FE00443480 /* TwentyMicStageView.h */,
|
||||
4CEB9EAF2D0AF4FE00443480 /* TwentyMicStageView.m */,
|
||||
4CEB9EB12D0AFCE200443480 /* NineteenMicStageView.h */,
|
||||
4CEB9EB22D0AFCE200443480 /* NineteenMicStageView.m */,
|
||||
);
|
||||
path = StageView;
|
||||
sourceTree = "<group>";
|
||||
@@ -10675,6 +10708,8 @@
|
||||
E81C27AA26EF2D920031E639 /* ThirdUserInfo.m */,
|
||||
E818DD1D2A48974300F163F7 /* LoginAreaModel.h */,
|
||||
E818DD1E2A48974300F163F7 /* LoginAreaModel.m */,
|
||||
4C6C92BE2D1172D9000A4693 /* RegionListInfo.h */,
|
||||
4C6C92BF2D1172D9000A4693 /* RegionListInfo.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -11748,6 +11783,7 @@
|
||||
E8751E6328A646400056EF44 /* XPSailingRankView.m in Sources */,
|
||||
23C9DFCC2B85DD8B00B51558 /* PIGuildAnchorIncomeSectionView.m in Sources */,
|
||||
9BD9A18027A0EFC7004186FE /* XPMineVisitorTableViewCell.m in Sources */,
|
||||
4C6C92C02D1172D9000A4693 /* RegionListInfo.m in Sources */,
|
||||
233423D02AAEFBC300B1253F /* PICandyTreeSetModel.m in Sources */,
|
||||
E85E7B112A4EB0D200B6D00A /* GuildPersonIncomeRecordModel.m in Sources */,
|
||||
54283CEB2CE48B71009729B5 /* ShoppingMallCategoryListView.m in Sources */,
|
||||
@@ -11883,6 +11919,7 @@
|
||||
23E9EAAE2A84C9B800B792F2 /* XPMineUserInfoTagView.m in Sources */,
|
||||
236B2E4E2AA07D06003967A8 /* Api+LittleGame.m in Sources */,
|
||||
237700E02BC7D78600D661F1 /* MSBaseRTLFlowLayout.m in Sources */,
|
||||
4CEB9EB32D0AFCE200443480 /* NineteenMicStageView.m in Sources */,
|
||||
2331C1B32A60F32D00E1D940 /* XPCandyTreeMoreRuleCell.m in Sources */,
|
||||
14A6034C29A35EE600D2A6A5 /* XPMineItemTableViewCell.m in Sources */,
|
||||
9BAC92F528E6E63000147DD8 /* XPRoomInsideOperationCell.m in Sources */,
|
||||
@@ -12158,6 +12195,7 @@
|
||||
E8B846CF26FDD96100A777FE /* XPMineRechageHeadView.m in Sources */,
|
||||
E852D74728633E92001465ED /* MonentsCommentReplyModel.m in Sources */,
|
||||
186A534926FC6ED900D67B2C /* TTAlertMessageAttributedConfig.m in Sources */,
|
||||
4CEB9EB02D0AF4FE00443480 /* TwentyMicStageView.m in Sources */,
|
||||
E8B3E80C2848BA40009746AB /* NewUserGreetModel.m in Sources */,
|
||||
E85E7B4D2A4EB0D300B6D00A /* XPMineGuildRemoveMemberViewController.m in Sources */,
|
||||
9BCB99A028F571B500466D64 /* XPMineCollectPartyRoomViewController.m in Sources */,
|
||||
@@ -12247,6 +12285,7 @@
|
||||
9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */,
|
||||
E8664ED927E4355C000171BA /* XPRoomPKRecordTableViewCell.m in Sources */,
|
||||
238B37AB2AC55A2C00BFC9D5 /* TreasureFairyConvertRecordModel.m in Sources */,
|
||||
4CEB9EAD2D09AA0400443480 /* SexAgeLabel.m in Sources */,
|
||||
23FF42762AA6E1480055733C /* XPHomeRecommendOtherRoomView.m in Sources */,
|
||||
142721B229A7647F00C7C423 /* XPBlankViewController.m in Sources */,
|
||||
E85E7B6B2A4EC39400B6D00A /* XPMineExchangeAuthorityModel.m in Sources */,
|
||||
@@ -12282,6 +12321,7 @@
|
||||
E8EEB91726FC7B35007C6EBA /* XPMineUserInfoDesViewController.m in Sources */,
|
||||
544A36352C94160F00CA7858 /* RoomMenuBar.m in Sources */,
|
||||
9B1B72AC280031DB003FACE9 /* XPAnchorPKViewController.m in Sources */,
|
||||
4CEB9EA72D09643E00443480 /* UserRoomCardViewController.m in Sources */,
|
||||
237852A12C072D8D00E360AC /* MSRoomGameModel.m in Sources */,
|
||||
180806FB2729A354001FD836 /* ThemeColor+Room.m in Sources */,
|
||||
9BC8C83028090C9200C24F85 /* XPRoomAnchorRankBannerView.m in Sources */,
|
||||
@@ -12448,6 +12488,7 @@
|
||||
9B734F76288A92FB00CBDAA9 /* XPMineFunctionItemModel.m in Sources */,
|
||||
541DD9552C1EDEFB00B616C4 /* XPHomePagingViewController.m in Sources */,
|
||||
E82D5C70276AE60000858D6D /* HeadwearModel.m in Sources */,
|
||||
4C5C37232D0C1C7900BA9AB8 /* RegionListViewController.m in Sources */,
|
||||
238B37CC2AC55A2C00BFC9D5 /* XPTreasureFairyPrizeSubView.m in Sources */,
|
||||
E81125C4296E57B7000D9804 /* QinputPhotoView.m in Sources */,
|
||||
E880B3A1278BD60C00A83B0D /* XPAcrossRoomPKSelectRoomView.m in Sources */,
|
||||
@@ -12554,6 +12595,7 @@
|
||||
23FF25792ABD67CD0064E904 /* XPFreeGiftModel.m in Sources */,
|
||||
9B92A33C2797E38100AD168F /* XPMineHeadItemTableViewCell.m in Sources */,
|
||||
E854103928646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m in Sources */,
|
||||
4CEB9EAA2D097E8400443480 /* MoliAvatar.m in Sources */,
|
||||
9B8DE0E1289CF02900FB6EC2 /* XPGiftCompoundModel.m in Sources */,
|
||||
23FF256E2ABC48810064E904 /* XPSessionMainViewController.m in Sources */,
|
||||
E85E7B092A4EB0D200B6D00A /* XPGuildRemoveMemberPresenter.m in Sources */,
|
||||
@@ -13234,7 +13276,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.20.46;
|
||||
MARKETING_VERSION = 20.20.49;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
@@ -13586,7 +13628,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.20.46;
|
||||
MARKETING_VERSION = 20.20.49;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
|
6
YuMi/Assets.xcassets/1.0.31/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "user_card_open_mic.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
@@ -10,6 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "切图 30@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/grey_arrow.imageset/切图 30@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "user_card_lock_mic.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
@@ -10,6 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "勾选@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/region_list_selected.imageset/勾选@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_at.imageset/3@3x.png
vendored
Normal file
After Width: | Height: | Size: 14 KiB |
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "user_card_close_mic.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
@@ -10,6 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "3@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_be_manager.imageset/2@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 5.5 KiB |
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "user_card_no_lock_mic.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
@@ -10,6 +9,7 @@
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "2@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_blacklist.imageset/3@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 6.0 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_blacklist.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "3@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_chat.imageset/2@3x.png
vendored
Normal file
After Width: | Height: | Size: 12 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_chat.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "2@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_clean_gift_value.imageset/2@3x.png
vendored
Normal file
After Width: | Height: | Size: 5.7 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_clean_gift_value.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "2@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_close_mic.imageset/5@3x (3).png
vendored
Normal file
After Width: | Height: | Size: 6.6 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_close_mic.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "5@3x (3).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_follow.imageset/4@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 13 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_follow.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "4@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_gift.imageset/2@3x (2).png
vendored
Normal file
After Width: | Height: | Size: 4.9 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_gift.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "2@3x (2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_kick.imageset/1@3x.png
vendored
Normal file
After Width: | Height: | Size: 4.9 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_kick.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "1@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_lock.imageset/1@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 4.9 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_lock.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "1@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_not_manager.imageset/5@3x (2).png
vendored
Normal file
After Width: | Height: | Size: 5.8 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_not_manager.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "5@3x (2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_open_mic.imageset/4@3x (2).png
vendored
Normal file
After Width: | Height: | Size: 5.9 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_open_mic.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "4@3x (2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_out_mic.imageset/5@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 6.2 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_out_mic.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "5@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
21
YuMi/Assets.xcassets/1.0.31/room_user_card_report.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/1.0.31/room_user_card_report.imageset/举报@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_send_gift.imageset/1@3x.png
vendored
Normal file
After Width: | Height: | Size: 24 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_send_gift.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "1@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_unfollow.imageset/4@3x.png
vendored
Normal file
After Width: | Height: | Size: 5.9 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_unfollow.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "4@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_unlock.imageset/1@3x (2).png
vendored
Normal file
After Width: | Height: | Size: 5.0 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_unlock.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "1@3x (2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_card_up_mic.imageset/5@3x.png
vendored
Normal file
After Width: | Height: | Size: 6.3 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_card_up_mic.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "5@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
21
YuMi/Assets.xcassets/1.0.31/room_user_position_empty.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "组 8307@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_position_empty.imageset/组 8307@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 9.1 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_position_owner.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "组 8307@3x (3).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_position_owner.imageset/组 8307@3x (3).png
vendored
Normal file
After Width: | Height: | Size: 16 KiB |
21
YuMi/Assets.xcassets/1.0.31/room_user_position_used.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "组 8307@3x (2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/1.0.31/room_user_position_used.imageset/组 8307@3x (2).png
vendored
Normal file
After Width: | Height: | Size: 8.7 KiB |
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "user_card_clean_gift_value.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 825 B |
Before Width: | Height: | Size: 1.0 KiB |
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "user_card_down_mic_listen.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 933 B |
Before Width: | Height: | Size: 922 B |
Before Width: | Height: | Size: 854 B |
Before Width: | Height: | Size: 988 B |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_invite_micro_disable@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_invite_micro_disable@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_invite_micro_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_invite_micro_normal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1001 B |
Before Width: | Height: | Size: 1.6 KiB |
22
YuMi/CustomUI/MoliAvatar.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// MoliAvatar.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/11.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class UserInfoModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MoliAvatar : UIView
|
||||
|
||||
@property(nonatomic, strong) UserInfoModel *userInfo;
|
||||
|
||||
@property(nonatomic, copy) void(^handleTapAvatar)(void);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
153
YuMi/CustomUI/MoliAvatar.m
Normal file
@@ -0,0 +1,153 @@
|
||||
//
|
||||
// MoliAvatar.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/11.
|
||||
//
|
||||
|
||||
#import "MoliAvatar.h"
|
||||
|
||||
#import "UserInfoModel.h"
|
||||
|
||||
#import <SVGA.h>
|
||||
#import <YYImage/YYAnimatedImageView.h>
|
||||
|
||||
#import "UIView+VAP.h"
|
||||
#import "SpriteSheetImageManager.h"
|
||||
|
||||
@interface MoliAvatar ()
|
||||
|
||||
@property (nonatomic,strong) NetImageView *avatarView;
|
||||
|
||||
///序列帧
|
||||
@property (nonatomic, strong) SpriteSheetImageManager *sequenceFrameManager;
|
||||
@property (nonatomic,strong) YYAnimatedImageView *sequenceFrameHeadWear;
|
||||
|
||||
///SVGA
|
||||
@property (nonatomic, strong) SVGAImageView *headWearSvgaImageView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MoliAvatar
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (_headWearSvgaImageView) {
|
||||
[_headWearSvgaImageView stopAnimation];
|
||||
}
|
||||
}
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
[self addSubview:self.avatarView];
|
||||
[self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
[self.avatarView setCornerRadius:self.frame.size.height / 2];
|
||||
}
|
||||
|
||||
- (void)setUserInfo:(UserInfoModel *)userInfo {
|
||||
_userInfo = userInfo;
|
||||
|
||||
self.avatarView.imageUrl = userInfo.avatar;
|
||||
|
||||
NSString *headerUrl = self.userInfo.headwearEffect.length > 0 ? self.userInfo.headwearEffect : self.userInfo.headwearPic;
|
||||
if ([NSString isEmpty:headerUrl]) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ([userInfo isHeadWearSVGA]) {
|
||||
[self setupAndPlaySVGA: headerUrl];
|
||||
} else {
|
||||
[self setupAndPlayAnimate: headerUrl];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupAndPlaySVGA:(NSString *)url {
|
||||
[self addSubview:self.headWearSvgaImageView];
|
||||
[self.headWearSvgaImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.mas_equalTo(self.avatarView);
|
||||
make.size.mas_equalTo(self.avatarView).multipliedBy(1.3);
|
||||
}];
|
||||
|
||||
[self.headWearSvgaImageView setImageName:url];
|
||||
}
|
||||
|
||||
- (void)setupAndPlayAnimate:(NSString *)url {
|
||||
[self addSubview:self.sequenceFrameHeadWear];
|
||||
[self.sequenceFrameHeadWear mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.mas_equalTo(self.avatarView);
|
||||
make.size.mas_equalTo(self.avatarView).multipliedBy(1.3);
|
||||
}];
|
||||
|
||||
@kWeakify(self);
|
||||
[self.sequenceFrameManager loadSpriteSheetImageWithURL:[NSURL URLWithString:url]
|
||||
completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
|
||||
@kStrongify(self);
|
||||
self.sequenceFrameHeadWear.image = sprit;
|
||||
} failureBlock:^(NSError * _Nullable error) {}];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (void)clickAvatarAction {
|
||||
if (self.handleTapAvatar) {
|
||||
self.handleTapAvatar();
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
|
||||
#pragma mark -
|
||||
-(NetImageView *)avatarView{
|
||||
if (!_avatarView){
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
_avatarView = [[NetImageView alloc]initWithConfig:config];
|
||||
_avatarView.layer.cornerRadius = kGetScaleWidth(41);
|
||||
_avatarView.layer.masksToBounds = YES;
|
||||
_avatarView.layer.borderWidth = 1;
|
||||
_avatarView.userInteractionEnabled = YES;
|
||||
_avatarView.layer.borderColor = [UIColor whiteColor].CGColor;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickAvatarAction)];
|
||||
[_avatarView addGestureRecognizer:tap];
|
||||
}
|
||||
return _avatarView;
|
||||
}
|
||||
|
||||
- (SVGAImageView *)headWearSvgaImageView {
|
||||
if (!_headWearSvgaImageView) {
|
||||
_headWearSvgaImageView = [[SVGAImageView alloc]init];
|
||||
_headWearSvgaImageView.backgroundColor = [UIColor clearColor];
|
||||
_headWearSvgaImageView.frame = self.bounds;
|
||||
_headWearSvgaImageView.userInteractionEnabled = NO;
|
||||
_headWearSvgaImageView.autoPlay = YES;
|
||||
}
|
||||
return _headWearSvgaImageView;
|
||||
}
|
||||
|
||||
- (YYAnimatedImageView *)sequenceFrameHeadWear {
|
||||
if (!_sequenceFrameHeadWear) {
|
||||
_sequenceFrameHeadWear = [[YYAnimatedImageView alloc] init];
|
||||
_sequenceFrameHeadWear.backgroundColor = [UIColor clearColor];
|
||||
_sequenceFrameHeadWear.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _sequenceFrameHeadWear;
|
||||
}
|
||||
|
||||
- (SpriteSheetImageManager *)sequenceFrameManager {
|
||||
if (!_sequenceFrameManager) {
|
||||
_sequenceFrameManager = [[SpriteSheetImageManager alloc] init];
|
||||
}
|
||||
return _sequenceFrameManager;
|
||||
}
|
||||
|
||||
@end
|
18
YuMi/CustomUI/SexAgeLabel.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// SexAgeLabel.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/11.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SexAgeLabel : UIView
|
||||
|
||||
- (void)updateSex:(BOOL)isMale age:(NSInteger)age;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
65
YuMi/CustomUI/SexAgeLabel.m
Normal file
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// SexAgeLabel.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/11.
|
||||
//
|
||||
|
||||
#import "SexAgeLabel.h"
|
||||
|
||||
@interface SexAgeLabel ()
|
||||
|
||||
@property(nonatomic, strong) UIView *pillBackground;
|
||||
@property(nonatomic, strong) UIImageView *sexImageView;
|
||||
@property(nonatomic, strong) UILabel *ageLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SexAgeLabel
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
|
||||
// self.frame = CGRectMake(0, 0, 35, 16);
|
||||
|
||||
[self setCornerRadius:8];
|
||||
[self addGradientBackgroundWithColors:@[[UIColor redColor], [UIColor blueColor]] startPoint:CGPointMake(0.5, 0) endPoint:CGPointMake(0.5, 1) cornerRadius:8];
|
||||
|
||||
[self addSubview:self.sexImageView];
|
||||
[self addSubview:self.ageLabel];
|
||||
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.leading.mas_equalTo(2);
|
||||
make.width.height.mas_equalTo(8);
|
||||
}];
|
||||
|
||||
[self.ageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.leading.mas_equalTo(self.sexImageView.mas_trailing).offset(2);
|
||||
make.trailing.mas_equalTo(-2);
|
||||
}];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)updateSex:(BOOL)isMale age:(NSInteger)age {
|
||||
self.sexImageView.image = isMale ? kImage(@"session_user_sex_male") : kImage(@"session_user_sex_female");
|
||||
self.ageLabel.text = @(age).stringValue;
|
||||
}
|
||||
|
||||
- (UIImageView *)sexImageView {
|
||||
if (!_sexImageView) {
|
||||
_sexImageView = [[UIImageView alloc] init];
|
||||
_sexImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _sexImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)ageLabel {
|
||||
if (!_ageLabel) {
|
||||
_ageLabel = [UILabel labelInitWithText:@"" font:kFontSemibold(12) textColor:[UIColor whiteColor]];
|
||||
}
|
||||
return _ageLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -46,7 +46,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
|
||||
#define kFontHeavy(font) [UIFont systemFontOfSize:kGetScaleWidth(font) weight:UIFontWeightHeavy]
|
||||
|
||||
///内置版本号
|
||||
#define PI_App_Version @"1.0.31"
|
||||
#define PI_App_Version @"1.0.34"
|
||||
///渠道
|
||||
#define PI_App_Source @"appstore"
|
||||
#define PI_Test_Flight @"TestFlight"
|
||||
|
26
YuMi/Modules/YMLogin/Model/RegionListInfo.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// RegionListInfo.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/17.
|
||||
//
|
||||
|
||||
#import "PIBaseModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RegionListInfo : PIBaseModel
|
||||
|
||||
@property(nonatomic, assign) BOOL checked;
|
||||
@property(nonatomic, copy) NSString *code;
|
||||
@property(nonatomic, copy) NSString *icon;
|
||||
@property(nonatomic, copy) NSString *id;
|
||||
@property(nonatomic, copy) NSString *name;
|
||||
@property(nonatomic, copy) NSString *partitionDesc;
|
||||
@property(nonatomic, assign) NSInteger partitionId;
|
||||
@property(nonatomic, copy) NSString *regionDesc;
|
||||
@property(nonatomic, assign) NSInteger seq;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
YuMi/Modules/YMLogin/Model/RegionListInfo.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// RegionListInfo.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/17.
|
||||
//
|
||||
|
||||
#import "RegionListInfo.h"
|
||||
|
||||
@implementation RegionListInfo
|
||||
|
||||
@end
|
@@ -8,7 +8,7 @@
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class ThirdUserInfo;
|
||||
@class ThirdUserInfo, RegionListInfo;
|
||||
@interface LoginFullInfoPresenter : BaseMvpPresenter
|
||||
|
||||
/// 获取保存的第三方的数据模型
|
||||
@@ -31,7 +31,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
inviteCode:(NSString * __nullable)inviteCode
|
||||
roomUid:(NSString * __nullable)roomUid
|
||||
shareUid:(NSString * __nullable)shareUid
|
||||
shareChannel:(NSString * __nullable)shareChannel;
|
||||
shareChannel:(NSString * __nullable)shareChannel
|
||||
regionId:(NSString *)regionId;
|
||||
|
||||
- (void)loadAllRegionInfo:(void(^)(NSArray <RegionListInfo *>*array))success failure:(void(^)(NSError *error))failure;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#import "AccountInfoStorage.h"
|
||||
///Model
|
||||
#import "ThirdUserInfo.h"
|
||||
#import "RegionListInfo.h"
|
||||
|
||||
@implementation LoginFullInfoPresenter
|
||||
|
||||
@@ -52,7 +53,8 @@
|
||||
inviteCode:(NSString * __nullable)inviteCode
|
||||
roomUid:(NSString * __nullable)roomUid
|
||||
shareUid:(NSString * __nullable)shareUid
|
||||
shareChannel:(NSString * __nullable)shareChannel {
|
||||
shareChannel:(NSString * __nullable)shareChannel
|
||||
regionId:(NSString *)regionId{
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
NSString * ticket = [[AccountInfoStorage instance] getTicket];
|
||||
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
||||
@@ -61,6 +63,9 @@
|
||||
[params safeSetObject:nick forKey:@"nick"];
|
||||
[params safeSetObject:uid forKey:@"uid"];
|
||||
[params safeSetObject:ticket forKey:@"ticket"];
|
||||
if (regionId.length > 0) {
|
||||
[params safeSetObject:regionId forKey:@"regionId"];
|
||||
}
|
||||
if (inviteCode.length > 0) {
|
||||
[params safeSetObject:inviteCode forKey:@"inviteCode"];
|
||||
}
|
||||
@@ -83,4 +88,19 @@
|
||||
} errorToast:YES] userInfo:params];
|
||||
}
|
||||
|
||||
- (void)loadAllRegionInfo:(void(^)(NSArray <RegionListInfo *>*array))success failure:(void(^)(NSError *error))failure {
|
||||
[Api requestAllRegionInfoCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
if (data.code == 200) {
|
||||
NSArray *array = [RegionListInfo modelsWithArray:data.data];
|
||||
if (success) {
|
||||
success(array);
|
||||
}
|
||||
}
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
if (failure) {
|
||||
failure([NSError errorWithDomain:msg code:code userInfo:nil]);
|
||||
}
|
||||
} showLoading:YES errorToast:YES]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -26,7 +26,11 @@
|
||||
#import "PILoginManager.h"
|
||||
#import "ClientConfig.h"
|
||||
|
||||
@interface LoginFullInfoViewController ()<LoginFullInfoProtocol>
|
||||
#import "RegionListViewController.h"
|
||||
|
||||
#import "RegionListInfo.h"
|
||||
|
||||
@interface LoginFullInfoViewController ()<LoginFullInfoProtocol, UIViewControllerTransitioningDelegate>
|
||||
|
||||
///背景
|
||||
@property(nonatomic,strong) UIImageView *bgImageView;
|
||||
@@ -61,11 +65,19 @@
|
||||
///邀请码输入框
|
||||
@property (nonatomic,strong) MSBaseTextField *codeTextField;
|
||||
|
||||
@property (nonatomic,strong) UIView *regionContainView;
|
||||
@property(nonatomic, strong) UILabel *regionLabel;
|
||||
@property(nonatomic, strong) NetImageView *regionFlagImageView;
|
||||
|
||||
|
||||
///第三方的用户信息
|
||||
@property (nonatomic,strong) ThirdUserInfo *thirdInfo;
|
||||
///目前选择的性别
|
||||
@property (nonatomic,copy) NSString *sexString;
|
||||
|
||||
@property(nonatomic, copy) NSArray <RegionListInfo *> *regionInfoList;
|
||||
@property(nonatomic, strong) RegionListInfo *selectedRegion;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LoginFullInfoViewController
|
||||
@@ -83,6 +95,7 @@
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self initEvents];
|
||||
[self loadAllRegions];
|
||||
ClientConfig *config = [ClientConfig shareConfig];
|
||||
if (config.inviteCode.length > 0){
|
||||
self.inviteCode = config.inviteCode;
|
||||
@@ -94,6 +107,22 @@
|
||||
[self.view endEditing:YES];
|
||||
}
|
||||
|
||||
- (void)loadAllRegions {
|
||||
@kWeakify(self);
|
||||
[self.presenter loadAllRegionInfo:^(NSArray<RegionListInfo *> * _Nonnull array) {
|
||||
@kStrongify(self);
|
||||
self.regionInfoList = array;
|
||||
for (RegionListInfo *info in array) {
|
||||
if (info.checked) {
|
||||
[self updateRegion:info];
|
||||
break;
|
||||
}
|
||||
}
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
@@ -107,6 +136,7 @@
|
||||
[self.bgView addSubview:self.backView];
|
||||
|
||||
[self.view addSubview:self.codeContainView];
|
||||
[self.view addSubview:self.regionContainView];
|
||||
[self.view addSubview:self.nextButton];
|
||||
[self.view addSubview:self.block18Tips];
|
||||
|
||||
@@ -118,6 +148,21 @@
|
||||
[self.sexStackView addArrangedSubview:self.femaleView];
|
||||
|
||||
[self.codeContainView addSubview:self.codeTextField];
|
||||
|
||||
UIStackView *regionStack = [[UIStackView alloc] initWithArrangedSubviews:@[
|
||||
self.regionFlagImageView,
|
||||
self.regionLabel
|
||||
]];
|
||||
regionStack.spacing = 4;
|
||||
[self.regionContainView addSubview:regionStack];
|
||||
[regionStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(24));
|
||||
make.centerY.mas_equalTo(self.regionContainView);
|
||||
}];
|
||||
|
||||
[self.regionFlagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(0, 18));
|
||||
}];
|
||||
|
||||
if ([self.presenter getThirdUserInfo] && [self.presenter getThirdUserInfo].userName.length > 0) {
|
||||
self.textField.text = [self.presenter getThirdUserInfo].userName;
|
||||
@@ -130,23 +175,30 @@
|
||||
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.top.equalTo(self.view);
|
||||
make.height.mas_equalTo(kGetScaleWidth(418));
|
||||
make.height.mas_equalTo(kGetScaleWidth(140));
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(kGetScaleWidth(128));
|
||||
if (iPhoneXSeries) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(128));
|
||||
} else {
|
||||
make.top.mas_equalTo(kGetScaleWidth(68));
|
||||
}
|
||||
make.leading.mas_equalTo(kGetScaleWidth(24));
|
||||
make.height.mas_equalTo(kGetScaleWidth(40));
|
||||
}];
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.equalTo(self.view);
|
||||
make.top.mas_equalTo(kGetScaleWidth(192));
|
||||
if (iPhoneXSeries) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(192));
|
||||
} else {
|
||||
make.top.mas_equalTo(kGetScaleWidth(132));
|
||||
}
|
||||
}];
|
||||
[self.remindLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.equalTo(self.bgView).inset(kGetScaleWidth(10));
|
||||
make.top.mas_equalTo(kGetScaleWidth(48));
|
||||
|
||||
}];
|
||||
|
||||
[self.sexStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -196,12 +248,17 @@
|
||||
make.top.bottom.mas_equalTo(self.codeContainView);
|
||||
make.trailing.mas_equalTo(self.codeContainView).offset(-kGetScaleWidth(18));
|
||||
}];
|
||||
|
||||
[self.regionContainView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.height.mas_equalTo(self.backView);
|
||||
make.top.mas_equalTo(self.codeContainView.mas_bottom).offset(kGetScaleWidth(20));
|
||||
}];
|
||||
|
||||
[self.nextButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(303));
|
||||
make.centerX.equalTo(self.bgView);
|
||||
make.height.mas_equalTo(kGetScaleWidth(48));
|
||||
make.top.mas_equalTo(self.codeContainView.mas_bottom).offset(kGetScaleWidth(48));
|
||||
make.top.mas_equalTo(self.regionContainView.mas_bottom).offset(kGetScaleWidth(38));
|
||||
}];
|
||||
|
||||
[self.block18Tips mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -228,10 +285,59 @@
|
||||
_inviteCode = inviteCode;
|
||||
self.codeTextField.text = _inviteCode;
|
||||
}
|
||||
|
||||
- (void)didTapRegionButton {
|
||||
__block RegionListViewController *vc;
|
||||
if (self.regionInfoList.count == 0) {
|
||||
@kWeakify(self);
|
||||
[self.presenter loadAllRegionInfo:^(NSArray<RegionListInfo *> * _Nonnull array) {
|
||||
@kStrongify(self);
|
||||
self.regionInfoList = array;
|
||||
vc = [[RegionListViewController alloc] initForRegionList:array];
|
||||
[self presentViewController:vc animated:YES completion:nil];
|
||||
@kWeakify(self);
|
||||
[vc setHandleTapRegionComfirm:^(RegionListInfo * _Nonnull regionInfo) {
|
||||
@kStrongify(self);
|
||||
[self updateRegion:regionInfo];
|
||||
}];
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
} else {
|
||||
vc = [[RegionListViewController alloc] initForRegionList:self.regionInfoList];
|
||||
[self presentViewController:vc animated:YES completion:nil];
|
||||
@kWeakify(self);
|
||||
[vc setHandleTapRegionComfirm:^(RegionListInfo * _Nonnull regionInfo) {
|
||||
@kStrongify(self);
|
||||
[self updateRegion:regionInfo];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateRegion:(RegionListInfo *)model {
|
||||
self.selectedRegion = model;
|
||||
self.regionLabel.text = model.name;
|
||||
self.regionFlagImageView.imageUrl = model.icon;
|
||||
self.regionLabel.textColor = UIColorFromRGB(0x313131);
|
||||
|
||||
[self.regionFlagImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(24, 18));
|
||||
}];
|
||||
[self.regionContainView layoutIfNeeded];
|
||||
|
||||
[self updateNextButton];
|
||||
}
|
||||
|
||||
///更新用户信息
|
||||
- (void)updateUserInfo {
|
||||
[XNDJTDDLoadingTool showOnlyView:self.view];
|
||||
[self.presenter complectionInfoWithAvatar:[self getAvatarUrl] gender:self.maleView.selected ? @"1":@"2" nick:self.textField.text inviteCode:self.codeTextField.text roomUid:nil shareUid:nil shareChannel:nil];
|
||||
[self.presenter complectionInfoWithAvatar:[self getAvatarUrl]
|
||||
gender:self.maleView.selected ? @"1":@"2" nick:self.textField.text
|
||||
inviteCode:self.codeTextField.text
|
||||
roomUid:nil
|
||||
shareUid:nil
|
||||
shareChannel:nil
|
||||
regionId:self.selectedRegion.id];
|
||||
}
|
||||
|
||||
///获取头像 可能是从第三方获取的头像
|
||||
@@ -246,7 +352,7 @@
|
||||
}
|
||||
|
||||
- (void)updateNextButton {
|
||||
if (self.textField.text.length > 0 && self.sexString.length > 0) {
|
||||
if (self.textField.text.length > 0 && self.sexString.length > 0 && self.selectedRegion) {
|
||||
self.nextButton.enabled = YES;
|
||||
} else {
|
||||
self.nextButton.enabled = NO;
|
||||
@@ -318,8 +424,8 @@
|
||||
- (UIImageView *)bgImageView{
|
||||
if(!_bgImageView){
|
||||
_bgImageView = [[UIImageView alloc]init];
|
||||
_bgImageView.image = kImage(@"login_phone_pwd_bg");
|
||||
_bgImageView.contentMode = 2;
|
||||
_bgImageView.image = kImage(@"home_top_bg");
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
@@ -494,4 +600,46 @@
|
||||
}
|
||||
return _bgView;
|
||||
}
|
||||
|
||||
- (UIView *)regionContainView {
|
||||
if (!_regionContainView) {
|
||||
_regionContainView = [[UIView alloc] init];
|
||||
_regionContainView.backgroundColor = UIColorFromRGB(0xF5F6FA);
|
||||
[_regionContainView setCornerRadius:kGetScaleWidth(52)/2];
|
||||
|
||||
UIImageView *arrow = [[UIImageView alloc] initWithImage:[kImage(@"grey_arrow") ms_SetImageForRTL]];
|
||||
// arrow.layer.contentsRect = CGRectMake(0.1, 0.1, 0.8, 0.8);
|
||||
arrow.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[_regionContainView addSubview:arrow];
|
||||
[arrow mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(_regionContainView);
|
||||
make.trailing.mas_equalTo(-20);
|
||||
make.width.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapRegionButton)];
|
||||
[_regionContainView addGestureRecognizer:tap];
|
||||
}
|
||||
return _regionContainView;
|
||||
}
|
||||
|
||||
- (UILabel *)regionLabel {
|
||||
if (!_regionLabel) {
|
||||
_regionLabel = [UILabel labelInitWithText:YMLocalizedString(@"1.0.31_text_0")
|
||||
font:kFontMedium(12)
|
||||
textColor:UIColorFromRGB(0xb3b3c1)];
|
||||
_regionLabel.userInteractionEnabled = YES;
|
||||
}
|
||||
return _regionLabel;
|
||||
}
|
||||
|
||||
- (NetImageView *)regionFlagImageView {
|
||||
if (!_regionFlagImageView) {
|
||||
_regionFlagImageView = [[NetImageView alloc] init];
|
||||
_regionFlagImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_regionFlagImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _regionFlagImageView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
23
YuMi/Modules/YMLogin/View/RegionListViewController.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// RegionListViewController.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/13.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
@class PIHomeCategoryTitleModel, RegionListInfo;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RegionListViewController : MvpViewController
|
||||
|
||||
@property(nonatomic, copy) void(^handleDismiss)(void);
|
||||
@property(nonatomic, copy) void(^handleTapCategiryComfirm)(PIHomeCategoryTitleModel *tagModel);
|
||||
@property(nonatomic, copy) void(^handleTapRegionComfirm)(RegionListInfo *regionInfo);
|
||||
|
||||
- (instancetype)initForRegionList:(NSArray <RegionListInfo *>*)regionInfoList;
|
||||
- (instancetype)initForHomeTags:(NSArray <PIHomeCategoryTitleModel*>*)tags currentItem:(PIHomeCategoryTitleModel *)itemModel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
510
YuMi/Modules/YMLogin/View/RegionListViewController.m
Normal file
@@ -0,0 +1,510 @@
|
||||
//
|
||||
// RegionListViewController.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/13.
|
||||
//
|
||||
|
||||
#import "RegionListViewController.h"
|
||||
|
||||
#import "PIHomeCategoryTitleModel.h"
|
||||
#import "LoginFullInfoPresenter.h"
|
||||
#import "RegionListInfo.h"
|
||||
|
||||
@interface RegionListCell : UICollectionViewCell
|
||||
|
||||
@property(nonatomic, strong) RegionListInfo *regionModel;
|
||||
@property(nonatomic, strong) PIHomeCategoryTitleModel *tagModel;
|
||||
|
||||
@property(nonatomic, strong) UIView *selectedBG;
|
||||
@property(nonatomic, strong) UIImageView *selectedMark;
|
||||
@property(nonatomic, strong) NetImageView *flagImageView;
|
||||
@property(nonatomic, strong) UILabel *titleLabel;
|
||||
|
||||
+ (void)registerTo:(UICollectionView *)collectionView;
|
||||
+ (RegionListCell *)cellFor:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RegionListCell
|
||||
+ (void)registerTo:(UICollectionView *)collectionView {
|
||||
[collectionView registerClass:[self class] forCellWithReuseIdentifier:NSStringFromClass([self class])];
|
||||
}
|
||||
|
||||
+ (RegionListCell *)cellFor:(UICollectionView *)collectionView
|
||||
indexPath:(NSIndexPath *)indexPath {
|
||||
RegionListCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([self class])
|
||||
forIndexPath:indexPath];
|
||||
// [cell.contentView setBackgroundColor:UIColorFromRGB(0xF7F7F7)];
|
||||
// [cell setCornerRadius:19];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self.contentView addSubview:self.flagImageView];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.selectedMark];
|
||||
|
||||
[self.flagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(14);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.size.mas_equalTo(CGSizeMake(30, 22));
|
||||
}];
|
||||
|
||||
[self.selectedMark mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-14);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.size.mas_equalTo(CGSizeMake(20, 20));
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.flagImageView.mas_trailing).offset(6);
|
||||
make.trailing.mas_equalTo(self.selectedMark.mas_leading).offset(-6);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
UIView *line = [[UIView alloc] init];
|
||||
line.backgroundColor = UIColorFromRGB(0xe4e4e4);
|
||||
[self.contentView addSubview:line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.contentView);
|
||||
make.trailing.mas_equalTo(self.selectedMark);
|
||||
make.leading.mas_equalTo(self.flagImageView);
|
||||
make.height.mas_equalTo(1);
|
||||
}];
|
||||
|
||||
// [self.contentView addSubview:self.selectedBG];
|
||||
// [self.selectedBG mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self.contentView);
|
||||
// }];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected {
|
||||
[super setSelected:selected];
|
||||
|
||||
// self.selectedBG.hidden = !selected;
|
||||
self.selectedMark.hidden = !selected;
|
||||
|
||||
// if (selected) {
|
||||
// [self.contentView setBackgroundColor:UIColorFromRGB(0xFFFAF5)];
|
||||
// } else {
|
||||
// [self.contentView setBackgroundColor:UIColorFromRGB(0xF7F7F7)];
|
||||
// }
|
||||
}
|
||||
|
||||
- (void)prepareForReuse {
|
||||
[super prepareForReuse];
|
||||
self.flagImageView.image = nil;
|
||||
}
|
||||
|
||||
- (void)setTagModel:(PIHomeCategoryTitleModel *)tagModel {
|
||||
_tagModel = tagModel;
|
||||
self.flagImageView.imageUrl = tagModel.icon;
|
||||
self.titleLabel.text = tagModel.name;
|
||||
}
|
||||
|
||||
- (void)setRegionModel:(RegionListInfo *)regionModel {
|
||||
_regionModel = regionModel;
|
||||
self.flagImageView.imageUrl = regionModel.icon;
|
||||
self.titleLabel.text = regionModel.name;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (UIView *)selectedBG {
|
||||
if (!_selectedBG) {
|
||||
_selectedBG = [[UIView alloc] init];
|
||||
[_selectedBG setCornerRadius:19
|
||||
corners:kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMinXMinYCorner
|
||||
borderWidth:1
|
||||
borderColor:UIColorFromRGB(0xFF8C03)];
|
||||
_selectedBG.hidden = YES;
|
||||
}
|
||||
return _selectedBG;
|
||||
}
|
||||
|
||||
- (NetImageView *)flagImageView {
|
||||
if (!_flagImageView) {
|
||||
_flagImageView = [[NetImageView alloc] init];
|
||||
_flagImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _flagImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel labelInitWithText:@"" font:kFontMedium(15) textColor:UIColorFromRGB(0x313131)];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)selectedMark {
|
||||
if (!_selectedMark) {
|
||||
_selectedMark = [[UIImageView alloc] initWithImage:kImage(@"region_list_selected")];
|
||||
_selectedMark.hidden = YES;
|
||||
}
|
||||
return _selectedMark;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface RegionListViewController () <UISearchBarDelegate, UICollectionViewDelegateFlowLayout, UICollectionViewDataSource>
|
||||
|
||||
@property(nonatomic, assign) NSInteger type;
|
||||
@property(nonatomic, assign) CGFloat displayHeight;
|
||||
@property(nonatomic, strong) UILabel *titleLabel;
|
||||
@property(nonatomic, strong) UISearchBar *searchBar;
|
||||
@property(nonatomic, strong) UICollectionView *collectionView;
|
||||
@property(nonatomic, strong) UIButton *comfirmButton;
|
||||
@property(nonatomic, strong) UIView *bgView;
|
||||
@property(nonatomic, strong) UIView *emptyView;
|
||||
|
||||
@property(nonatomic, copy) NSArray <PIHomeCategoryTitleModel*> *tagDataSource;
|
||||
@property(nonatomic, strong) PIHomeCategoryTitleModel *selectedTag;
|
||||
|
||||
@property(nonatomic, copy) NSArray <RegionListInfo *> *regionList;
|
||||
@property(nonatomic, strong) NSMutableArray <RegionListInfo *> *filteredRegionList;
|
||||
@property(nonatomic, strong) RegionListInfo *selectedRegion;
|
||||
|
||||
@property(nonatomic, assign) NSInteger defaultIndex;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RegionListViewController
|
||||
|
||||
- (LoginFullInfoPresenter *)createPresenter {
|
||||
return [[LoginFullInfoPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (instancetype)initForRegionList:(NSArray <RegionListInfo *>*)regionInfoList {
|
||||
if (self = [super init]) {
|
||||
self.type = 1;
|
||||
self.displayHeight = KScreenHeight/2;
|
||||
self.regionList = regionInfoList;
|
||||
self.filteredRegionList = [regionInfoList mutableCopy];
|
||||
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (instancetype)initForHomeTags:(NSArray <PIHomeCategoryTitleModel*>*)tags
|
||||
currentItem:(nonnull PIHomeCategoryTitleModel *)itemModel {
|
||||
if (self = [super init]) {
|
||||
self.type = 2;
|
||||
self.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
self.displayHeight = KScreenHeight*2/3;
|
||||
|
||||
NSMutableArray *temp = @[].mutableCopy;
|
||||
for (PIHomeCategoryTitleModel *model in tags) {
|
||||
if (![NSString isEmpty:model.regionId]) {
|
||||
[temp addObject:model];
|
||||
}
|
||||
}
|
||||
|
||||
self.defaultIndex = [temp indexOfObject:itemModel];
|
||||
self.selectedTag = itemModel;
|
||||
self.tagDataSource = temp;
|
||||
|
||||
[self.collectionView reloadData];
|
||||
[self.collectionView selectItemAtIndexPath:[NSIndexPath indexPathForRow:self.defaultIndex inSection:0]
|
||||
animated:NO
|
||||
scrollPosition:UICollectionViewScrollPositionNone];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.title = YMLocalizedString(@"1.0.31_text_1");
|
||||
switch (self.type) {
|
||||
case 1:
|
||||
[self setupUIForFullDisplay];
|
||||
break;
|
||||
case 2:
|
||||
[self setupUIForHalfScreen];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupUIForFullDisplay {
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
// self.comfirmButton.frame = CGRectMake(0, 0, 48, 44);
|
||||
// UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.comfirmButton];
|
||||
// self.navigationItem.rightBarButtonItem = rightBarButtonItem;
|
||||
|
||||
[self.view addSubview:self.titleLabel];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(10);
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(34);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.comfirmButton];
|
||||
[self.comfirmButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
make.trailing.mas_equalTo(-15);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.searchBar];
|
||||
[self.searchBar mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(10);
|
||||
make.leading.trailing.mas_equalTo(self.view).inset(16);
|
||||
make.height.mas_equalTo(34);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.collectionView];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.searchBar.mas_bottom).offset(8);
|
||||
make.bottom.leading.trailing.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.emptyView];
|
||||
[self.emptyView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.collectionView).offset(8);
|
||||
make.centerX.mas_equalTo(self.collectionView);
|
||||
make.size.mas_equalTo(CGSizeMake(120, 120));
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setupUIForHalfScreen {
|
||||
self.view.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
|
||||
|
||||
[self.view addSubview:self.titleLabel];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(KScreenHeight - self.displayHeight);
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(34);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.comfirmButton];
|
||||
[self.comfirmButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
make.trailing.mas_equalTo(-15);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.collectionView];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(8);
|
||||
make.bottom.leading.trailing.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
[self.view insertSubview:self.bgView belowSubview:self.titleLabel];
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.titleLabel).offset(-10);
|
||||
make.leading.bottom.trailing.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
UIButton *b = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[b addTarget:self action:@selector(didTapSpace) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.view insertSubview:b atIndex:0];
|
||||
[b mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.leading.trailing.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(KScreenHeight/2);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)didTapComfirm {
|
||||
if (self.type == 1) {
|
||||
if (self.handleTapRegionComfirm) {
|
||||
self.handleTapRegionComfirm(self.selectedRegion);
|
||||
}
|
||||
|
||||
} else if (self.type == 2) {
|
||||
if (self.handleTapCategiryComfirm) {
|
||||
self.handleTapCategiryComfirm(self.selectedTag);
|
||||
}
|
||||
}
|
||||
[self dismissViewControllerAnimated:YES completion:^{}];
|
||||
}
|
||||
|
||||
- (void)didTapSpace {
|
||||
@kWeakify(self);
|
||||
[self dismissViewControllerAnimated:YES completion:^{
|
||||
@kStrongify(self);
|
||||
if (self.handleDismiss) {
|
||||
self.handleDismiss();
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UISearchBarDelegate
|
||||
// 当点击 "Search" 按钮时触发
|
||||
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
|
||||
[searchBar resignFirstResponder]; // 收起键盘
|
||||
}
|
||||
|
||||
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
|
||||
if (searchText.length == 0) {
|
||||
// 输入为空时,显示原始数据
|
||||
self.filteredRegionList = [self.regionList copy];
|
||||
} else {
|
||||
// 过滤数据
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name CONTAINS[cd] %@", searchText];
|
||||
self.filteredRegionList = [[self.regionList filteredArrayUsingPredicate:predicate] mutableCopy];
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
|
||||
self.emptyView.hidden = self.filteredRegionList.count > 0;
|
||||
}
|
||||
|
||||
// 点击取消按钮时重置数据
|
||||
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
|
||||
[searchBar resignFirstResponder];
|
||||
searchBar.text = @"";
|
||||
self.filteredRegionList = [self.regionList mutableCopy];
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
if (self.type == 1) {
|
||||
return self.filteredRegionList.count;
|
||||
} else if (self.type == 2) {
|
||||
return self.tagDataSource.count;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
RegionListCell *cell = [RegionListCell cellFor:collectionView indexPath:indexPath];
|
||||
if (self.type == 1) {
|
||||
cell.regionModel = [self.filteredRegionList xpSafeObjectAtIndex:indexPath.row];
|
||||
} else if (self.type == 2) {
|
||||
cell.tagModel = [self.tagDataSource xpSafeObjectAtIndex:indexPath.row];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.type == 1) {
|
||||
self.selectedRegion = [self.filteredRegionList xpSafeObjectAtIndex:indexPath.row];
|
||||
} else if (self.type == 2) {
|
||||
self.selectedTag = [self.tagDataSource xpSafeObjectAtIndex:indexPath.row];
|
||||
if (self.handleTapCategiryComfirm) {
|
||||
self.handleTapCategiryComfirm(self.selectedTag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (UISearchBar *)searchBar {
|
||||
if (!_searchBar) {
|
||||
UIColor *bgColor = UIColorFromRGB(0xf4f4f4);
|
||||
_searchBar = [[UISearchBar alloc] init];
|
||||
_searchBar.delegate = self;
|
||||
_searchBar.placeholder = YMLocalizedString(@"XPHomeSearchNavView1");
|
||||
_searchBar.barTintColor = bgColor;
|
||||
[_searchBar setCornerRadius:34/2];
|
||||
if (@available(iOS 13.0, *)) {
|
||||
_searchBar.searchTextField.backgroundColor = bgColor;
|
||||
_searchBar.searchTextField.textColor = UIColorFromRGB(0x313131);
|
||||
} else {
|
||||
UITextField *searchField = [self findTextFieldInSearchBar:_searchBar];
|
||||
if (searchField) {
|
||||
searchField.backgroundColor = bgColor;
|
||||
searchField.textColor = UIColorFromRGB(0x313131);
|
||||
}
|
||||
}
|
||||
}
|
||||
return _searchBar;
|
||||
}
|
||||
|
||||
- (UICollectionView *)collectionView {
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
// if (self.type == 1) {
|
||||
layout.itemSize = CGSizeMake(KScreenWidth - 30, 38);
|
||||
// } else if (self.type == 2) {
|
||||
// layout.itemSize = CGSizeMake(kGetScaleWidth(166), 38);
|
||||
// }
|
||||
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 16, kSafeAreaBottomHeight, 16);
|
||||
layout.minimumLineSpacing = 10;
|
||||
layout.minimumInteritemSpacing = 10;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 44, KScreenWidth, KScreenHeight-44)
|
||||
collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.backgroundColor = [UIColor whiteColor];
|
||||
[RegionListCell registerTo:_collectionView];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel labelInitWithText:YMLocalizedString(@"1.0.31_text_2")
|
||||
font:kFontSemibold(16)
|
||||
textColor:UIColorFromRGB(0x313131)];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)comfirmButton {
|
||||
if (!_comfirmButton) {
|
||||
_comfirmButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_comfirmButton setTitleColor:UIColorFromRGB(0xFF8C03) forState:UIControlStateNormal];
|
||||
[_comfirmButton setTitle:YMLocalizedString(@"TTAlertConfig0") forState:UIControlStateNormal];
|
||||
[_comfirmButton addTarget:self
|
||||
action:@selector(didTapComfirm)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _comfirmButton;
|
||||
}
|
||||
|
||||
- (UITextField *)findTextFieldInSearchBar:(UISearchBar *)searchBar {
|
||||
for (UIView *subview in searchBar.subviews) {
|
||||
for (UIView *nestedSubview in subview.subviews) {
|
||||
if ([nestedSubview isKindOfClass:[UITextField class]]) {
|
||||
return (UITextField *)nestedSubview;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (UIView *)bgView {
|
||||
if (!_bgView) {
|
||||
UIView *bg = [[UIView alloc] init];
|
||||
bg.backgroundColor = [UIColor whiteColor];
|
||||
[bg setCornerRadius:16 cornerMask:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner];
|
||||
bg.userInteractionEnabled = NO;
|
||||
_bgView = bg;
|
||||
}
|
||||
return _bgView;
|
||||
}
|
||||
|
||||
- (UIView *)emptyView {
|
||||
if (!_emptyView) {
|
||||
_emptyView = [[UIView alloc] init];
|
||||
UIImageView *icon = [[UIImageView alloc] initWithImage:[UIImageConstant defaultEmptyPlaceholder_UFO]];
|
||||
[_emptyView addSubview:icon];
|
||||
[icon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.centerX.mas_equalTo(_emptyView);
|
||||
make.size.mas_equalTo(CGSizeMake(80, 80));
|
||||
}];
|
||||
|
||||
UILabel *emptyTitle = [UILabel labelInitWithText:YMLocalizedString(@"XPMomentsRecommendViewController0")
|
||||
font:kFontRegular(14)
|
||||
textColor:[UIColor colorWithWhite:0 alpha:0.4]];
|
||||
emptyTitle.textAlignment = NSTextAlignmentCenter;
|
||||
[_emptyView addSubview:emptyTitle];
|
||||
[emptyTitle mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(_emptyView);
|
||||
make.top.mas_equalTo(icon.mas_bottom).offset(6);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
|
||||
_emptyView.hidden = YES;
|
||||
}
|
||||
return _emptyView;
|
||||
}
|
||||
@end
|
@@ -97,8 +97,7 @@
|
||||
self.recheckIndex = 0;
|
||||
}
|
||||
|
||||
// 尝试请求一下订单号,看看能否触发后端检查用户是否有未下发内容
|
||||
[self requestAPPOrderData:@"com.hflighting.yumi.gold.1_7000" isFroRecheck:YES];
|
||||
// [self requestAPPOrderData:@"com.hflighting.yumi.gold.1_7000" isFroRecheck:YES];
|
||||
|
||||
self.isProcessing = YES;
|
||||
NSDictionary *dic = [array xpSafeObjectAtIndex:self.recheckIndex];
|
||||
|
@@ -144,6 +144,7 @@ HWDMP4PlayDelegate>
|
||||
@property (nonatomic,strong) NetImageView *rechargeImageView;
|
||||
///铭牌图片
|
||||
@property (nonatomic,strong) NetImageView *vipPlateImageView;
|
||||
@property (nonatomic,strong) NetImageView *agentPlateImageView;
|
||||
///新用户
|
||||
@property (nonatomic,strong) UIImageView *newUserImageView;
|
||||
///官方的
|
||||
@@ -426,6 +427,7 @@ HWDMP4PlayDelegate>
|
||||
[stack addArrangedSubview:self.experImageView];
|
||||
[stack addArrangedSubview:self.charmImageView];
|
||||
[stack addArrangedSubview:self.vipPlateImageView];
|
||||
[stack addArrangedSubview:self.agentPlateImageView];
|
||||
|
||||
[self.beautIDView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(24);
|
||||
@@ -452,6 +454,10 @@ HWDMP4PlayDelegate>
|
||||
make.height.mas_equalTo(24);
|
||||
make.width.mas_equalTo(60);
|
||||
}];
|
||||
[self.agentPlateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(24);
|
||||
make.width.mas_equalTo(60);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setupNameplateArea {
|
||||
@@ -666,6 +672,10 @@ HWDMP4PlayDelegate>
|
||||
if (userInfo.usingPersonalBackground) {
|
||||
if (![NSString isEmpty:userInfo.usingPersonalBackground.effect]) {
|
||||
switch (userInfo.usingPersonalBackground.effectType) {
|
||||
case 0: {
|
||||
self.personalBGImageView.imageUrl = userInfo.usingPersonalBackground.effect;
|
||||
}
|
||||
break;
|
||||
case 1: {
|
||||
@kWeakify(self);
|
||||
[self.personalBGMP4Parser parseWithURL:[userInfo.usingPersonalBackground.effect pureURLString]
|
||||
@@ -734,11 +744,18 @@ HWDMP4PlayDelegate>
|
||||
}
|
||||
self.charmImageView.hidden = userInfo.userLevelVo.charmUrl.length <= 0;
|
||||
if (userInfo.userVipInfoVO.nameplateUrl.length > 0) {
|
||||
[self loadNamePlate:userInfo.userVipInfoVO.nameplateUrl];
|
||||
[self loadNamePlate:userInfo.userVipInfoVO.nameplateUrl targetView:self.vipPlateImageView];
|
||||
self.vipPlateImageView.hidden = NO;
|
||||
} else {
|
||||
self.vipPlateImageView.hidden = YES;
|
||||
}
|
||||
|
||||
if (userInfo.guildNameplateIcon.length > 0) {
|
||||
[self loadNamePlate:userInfo.guildNameplateIcon targetView:self.agentPlateImageView];
|
||||
self.agentPlateImageView.hidden = NO;
|
||||
} else {
|
||||
self.agentPlateImageView.hidden = YES;
|
||||
}
|
||||
|
||||
self.rechargeImageView.hidden = !_userInfo.isRechargeUser;
|
||||
[self.userPhotoArray removeAllObjects];
|
||||
@@ -781,14 +798,14 @@ HWDMP4PlayDelegate>
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadNamePlate:(NSString *)imagePath {
|
||||
[self.vipPlateImageView loadImageWithUrl:imagePath completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
- (void)loadNamePlate:(NSString *)imagePath targetView:(NetImageView *)targetView {
|
||||
[targetView loadImageWithUrl:imagePath completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
if (image) {
|
||||
CGSize size = image.size;
|
||||
[self.vipPlateImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
[targetView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(round(size.width * 24/size.height));
|
||||
}];
|
||||
self.vipPlateImageView.image = image;
|
||||
targetView.image = image;
|
||||
}
|
||||
}];
|
||||
}
|
||||
@@ -1181,6 +1198,20 @@ HWDMP4PlayDelegate>
|
||||
return _vipPlateImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)agentPlateImageView {
|
||||
if (!_agentPlateImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
config.imageType = ImageTypeUserCardLevel;
|
||||
_agentPlateImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_agentPlateImageView.userInteractionEnabled = YES;
|
||||
_agentPlateImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _agentPlateImageView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (UIImageView *)newUserImageView {
|
||||
if (!_newUserImageView) {
|
||||
_newUserImageView = [[UIImageView alloc] init];
|
||||
|
@@ -16,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic,copy) NSString *name;
|
||||
@property(nonatomic,copy) NSString *id;
|
||||
@property(nonatomic,assign) BOOL isHomeRecommend;
|
||||
@property(nonatomic, copy) NSString *icon;
|
||||
@property(nonatomic, copy) NSString *regionId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -133,12 +133,17 @@
|
||||
@kWeakify(self);
|
||||
[Api getHomeTabsCompletion:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
NSArray * array = [PIHomeCategoryTitleModel modelsWithArray:data.data];
|
||||
for (PIHomeCategoryTitleModel *model in array) {
|
||||
model.checkedWidth = [UILabel getWidthWithText:model.name height:kGetScaleWidth(44) font:kFontSemibold(16)];
|
||||
model.noCheckedWidth = [UILabel getWidthWithText:model.name height:kGetScaleWidth(44) font:kFontRegular(14)];
|
||||
if (code == 200) {
|
||||
NSArray * array = [PIHomeCategoryTitleModel modelsWithArray:data.data];
|
||||
for (PIHomeCategoryTitleModel *model in array) {
|
||||
model.checkedWidth = [UILabel getWidthWithText:model.name height:kGetScaleWidth(44) font:kFontSemibold(16)];
|
||||
model.noCheckedWidth = [UILabel getWidthWithText:model.name height:kGetScaleWidth(44) font:kFontRegular(14)];
|
||||
}
|
||||
[[self getView] getHomeTagListSuccess:array];
|
||||
} else {
|
||||
[[self getView] getHomeTagListFailure];
|
||||
[[self getView] showErrorToast:msg];
|
||||
}
|
||||
[[self getView] getHomeTagListSuccess:array];
|
||||
}];
|
||||
}
|
||||
///首页改版资源位
|
||||
|
@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@optional
|
||||
///获取所有的tag成功
|
||||
- (void)getHomeTagListSuccess:(NSArray<PIHomeCategoryTitleModel *> *)array;
|
||||
- (void)getHomeTagListFailure;
|
||||
///获取首页轮播图列表成功
|
||||
- (void)getHomeTopBannerListSuccess:(NSArray*)list;
|
||||
////首页改版资源位
|
||||
|
@@ -39,6 +39,12 @@
|
||||
[super viewDidLoad];
|
||||
[self setup];
|
||||
[self preLoadGifts];
|
||||
|
||||
//#if DEBUG
|
||||
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
// [self performSelector:@selector(completeUserInfo)];
|
||||
// });
|
||||
//#endif
|
||||
}
|
||||
|
||||
/// 禮物面板緩存-1: 登錄後,用空的 roomUid 預加載默認禮物,並緩存
|
||||
|
@@ -358,7 +358,7 @@
|
||||
if (!_collectionView) {
|
||||
MSBaseRTLFlowLayout *layout = [[MSBaseRTLFlowLayout alloc] init];
|
||||
layout.minimumInteritemSpacing = kGetScaleWidth(0);
|
||||
layout.minimumLineSpacing = kGetScaleWidth(10);
|
||||
layout.minimumLineSpacing = kGetScaleWidth(18);
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, kGetScaleWidth(15), 0, kGetScaleWidth(15));
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#import <JXPagingView/JXPagerListRefreshView.h>
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
#import "SDWebImageManager.h"
|
||||
///Tool
|
||||
#import "Api+Home.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
@@ -52,10 +53,232 @@
|
||||
#import "BaseNavigationController.h"
|
||||
#import "XPAdImageTool.h"
|
||||
#import "PIHomeCategoryTitleModel.h"
|
||||
|
||||
#import "RegionListViewController.h"
|
||||
|
||||
UIKIT_EXTERN NSString * kHomeMoreScrollPageKey;
|
||||
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
@interface XPNewHomeViewController ()<JXPagerViewDelegate,JXPagerMainTableViewGestureDelegate,JXCategoryViewDelegate, XPHomeContainerProtocol, XPNewHomeNavViewDelegate,XPNewHomeHeadViewDelegate,XPHomeRecommendOtherRoomViewDelegate,XPHomeRecommendViewControllerDelegate>
|
||||
|
||||
@interface HomeCategoryTabListCell : UICollectionViewCell
|
||||
@property(nonatomic, assign) BOOL isSelected;
|
||||
@property(nonatomic, strong) UIView *selectedBackground;
|
||||
@property(nonatomic, strong) NetImageView *iconImageView;
|
||||
@property(nonatomic, strong) PIHomeCategoryTitleModel *cellModel;
|
||||
@property(nonatomic, copy) void(^didTapCategoryModel)(PIHomeCategoryTitleModel *model);
|
||||
@end
|
||||
|
||||
@implementation HomeCategoryTabListCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
|
||||
[self.contentView setCornerRadius:15];
|
||||
self.contentView.backgroundColor = [UIColor whiteColor];
|
||||
[self.contentView addSubview:self.selectedBackground];
|
||||
[self.selectedBackground mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.contentView addSubview:self.iconImageView];
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.mas_equalTo(self.contentView);
|
||||
make.size.mas_equalTo(CGSizeMake(36, 23));
|
||||
}];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setCellModel:(PIHomeCategoryTitleModel *)cellModel {
|
||||
_cellModel = cellModel;
|
||||
self.iconImageView.imageUrl = cellModel.icon;
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected {
|
||||
[super setSelected:selected];
|
||||
self.selectedBackground.hidden = !selected;
|
||||
if (selected && self.didTapCategoryModel) {
|
||||
self.didTapCategoryModel(self.cellModel);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (UIView *)selectedBackground {
|
||||
if (!_selectedBackground) {
|
||||
_selectedBackground = [[UIView alloc] init];
|
||||
_selectedBackground.backgroundColor = [UIColor whiteColor];
|
||||
[_selectedBackground setCornerRadius:15
|
||||
corners:kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMinXMinYCorner
|
||||
borderWidth:1
|
||||
borderColor:UIColorFromRGB(0xFF8C03)];
|
||||
_selectedBackground.hidden = YES;
|
||||
}
|
||||
return _selectedBackground;
|
||||
}
|
||||
|
||||
- (NetImageView *)iconImageView {
|
||||
if (!_iconImageView) {
|
||||
_iconImageView = [[NetImageView alloc] init];
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface HomeCategoryTabList : UIView <UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
||||
@property(nonatomic, strong) UIButton *arrowButton;
|
||||
@property(nonatomic, strong) UIView *gradientMask;
|
||||
@property(nonatomic, strong) UICollectionView *tabCollectionView;
|
||||
@property(nonatomic, copy) NSArray <PIHomeCategoryTitleModel*> *tabArray;
|
||||
@property(nonatomic, copy) void(^didTapCategoryModel)(PIHomeCategoryTitleModel *model);
|
||||
@property(nonatomic, copy) void(^didTapArrow)(void);
|
||||
|
||||
- (void)closeArrow;
|
||||
- (void)updateIndex:(NSInteger)index;
|
||||
|
||||
@end
|
||||
|
||||
@implementation HomeCategoryTabList
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
self.backgroundColor = [[ClientConfig shareConfig] bgColor];
|
||||
|
||||
[self addSubview:self.tabCollectionView];
|
||||
[self.tabCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.mas_equalTo(self);
|
||||
make.leading.mas_equalTo(0);
|
||||
make.trailing.mas_equalTo(self).offset(-15);
|
||||
}];
|
||||
|
||||
[self addSubview:self.arrowButton];
|
||||
[self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.size.mas_equalTo(CGSizeMake(24, 24));
|
||||
make.trailing.mas_equalTo(-15);
|
||||
}];
|
||||
|
||||
_gradientMask = [[UIView alloc] init];
|
||||
[_gradientMask addGradientBackgroundWithColors:@[
|
||||
UIColorRGBAlpha(0xffffff, 0),
|
||||
[[ClientConfig shareConfig] bgColor],
|
||||
] startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(0.3, 0.5) cornerRadius:0];
|
||||
[self insertSubview:self.gradientMask belowSubview:self.arrowButton];
|
||||
[self.gradientMask mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(self.arrowButton);
|
||||
make.top.bottom.mas_equalTo(self);
|
||||
make.width.mas_equalTo(30);
|
||||
}];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)handleTapArrow {
|
||||
if (_didTapArrow) {
|
||||
self.didTapArrow();
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setTabArray:(NSArray<PIHomeCategoryTitleModel *> *)tabArray {
|
||||
// NSMutableArray *temp = @[].mutableCopy;
|
||||
// for (PIHomeCategoryTitleModel *model in tabArray) {
|
||||
// if (![NSString isEmpty:model.regionId]) {
|
||||
// [temp addObject:model];
|
||||
// }
|
||||
// }
|
||||
|
||||
_tabArray = tabArray;
|
||||
if (46 * _tabArray.count + 12 * (_tabArray.count-1) > KScreenWidth-30) {
|
||||
self.gradientMask.hidden = NO;
|
||||
self.arrowButton.hidden = NO;
|
||||
} else {
|
||||
self.gradientMask.hidden = YES;
|
||||
self.arrowButton.hidden = YES;
|
||||
}
|
||||
[self.tabCollectionView reloadData];
|
||||
if (_tabArray.count > 0) {
|
||||
[self.tabCollectionView selectItemAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]
|
||||
animated:NO
|
||||
scrollPosition:UICollectionViewScrollPositionNone];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)closeArrow {
|
||||
|
||||
}
|
||||
|
||||
- (void)updateIndex:(NSInteger)index {
|
||||
[self.tabCollectionView selectItemAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] animated:YES scrollPosition:UICollectionViewScrollPositionNone];
|
||||
// [self.tabCollectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.tabArray.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
HomeCategoryTabListCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"HomeCategoryTabListCell" forIndexPath:indexPath];
|
||||
cell.cellModel = [self.tabArray xpSafeObjectAtIndex:indexPath.row];
|
||||
@kWeakify(self);
|
||||
[cell setDidTapCategoryModel:^(PIHomeCategoryTitleModel *model) {
|
||||
@kStrongify(self);
|
||||
if (self.didTapCategoryModel) {
|
||||
self.didTapCategoryModel(model);
|
||||
}
|
||||
}];
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (UIButton *)arrowButton {
|
||||
if (!_arrowButton) {
|
||||
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_arrowButton.backgroundColor = [UIColor clearColor];
|
||||
[_arrowButton setImage:kImage(@"common_down_arrow")
|
||||
forState:UIControlStateNormal];
|
||||
[_arrowButton addTarget:self
|
||||
action:@selector(handleTapArrow)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _arrowButton;
|
||||
}
|
||||
|
||||
- (UIScrollView *)tabCollectionView {
|
||||
if (!_tabCollectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake(46, 30);
|
||||
layout.minimumLineSpacing = 12;
|
||||
layout.minimumInteritemSpacing = 12;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 14, 0, 30);
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
_tabCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
|
||||
collectionViewLayout:layout];
|
||||
_tabCollectionView.backgroundColor = [UIColor clearColor];
|
||||
_tabCollectionView.showsHorizontalScrollIndicator = NO;
|
||||
_tabCollectionView.delegate = self;
|
||||
_tabCollectionView.dataSource = self;
|
||||
[_tabCollectionView registerClass:[HomeCategoryTabListCell class]
|
||||
forCellWithReuseIdentifier:@"HomeCategoryTabListCell"];
|
||||
}
|
||||
return _tabCollectionView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface XPNewHomeViewController ()<
|
||||
JXPagerViewDelegate,
|
||||
JXPagerMainTableViewGestureDelegate,
|
||||
JXCategoryViewDelegate,
|
||||
XPHomeContainerProtocol,
|
||||
XPNewHomeNavViewDelegate,
|
||||
XPNewHomeHeadViewDelegate,
|
||||
XPHomeRecommendOtherRoomViewDelegate,
|
||||
XPHomeRecommendViewControllerDelegate>
|
||||
|
||||
///头视图
|
||||
@property(nonatomic,strong) XPNewHomeHeadView *headView;
|
||||
@@ -63,6 +286,8 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
@property (nonatomic, strong) NSMutableArray<PIHomeCategoryTitleModel *> *tagModelList;
|
||||
///分页控件
|
||||
@property (nonatomic, strong) JXCategoryTitleView *titleView;
|
||||
@property(nonatomic, strong) HomeCategoryTabList *categoryTagList;
|
||||
|
||||
///分页lineView
|
||||
@property (nonatomic, strong) JXPagerView *pagingView;
|
||||
|
||||
@@ -137,6 +362,18 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
kWindow.rootViewController = nav;
|
||||
XPAdImageTool.shareImageTool.isImLogin = NO;
|
||||
}
|
||||
|
||||
- (void)createTagScrollView {
|
||||
if (_categoryTagList) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self.titleView addSubview:self.categoryTagList];
|
||||
[self.categoryTagList mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.titleView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
|
||||
- (void)initSubViews {
|
||||
@@ -244,6 +481,23 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)showAllTags {
|
||||
RegionListViewController *vc = [[RegionListViewController alloc] initForHomeTags:self.tagModelList
|
||||
currentItem:self.tagModelList[self.titleView.selectedIndex]];
|
||||
@kWeakify(self);
|
||||
vc.handleDismiss = ^{
|
||||
@kStrongify(self);
|
||||
[self.categoryTagList closeArrow];
|
||||
};
|
||||
vc.handleTapCategiryComfirm = ^(PIHomeCategoryTitleModel *tagModel) {
|
||||
@kStrongify(self);
|
||||
NSInteger index = [self.tagModelList indexOfObject:tagModel];
|
||||
[self.titleView selectItemAtIndex:index];
|
||||
[self.categoryTagList updateIndex:index];
|
||||
};
|
||||
[self presentViewController:vc animated:YES completion:^{ }];
|
||||
}
|
||||
|
||||
#pragma mark - XPNewHomeNavViewDelegate
|
||||
- (void)xPNewHomeNavView:(XPNewHomeNavView *)view didClickRank:(UIButton *)sender {
|
||||
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
|
||||
@@ -310,7 +564,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
return self.headView;
|
||||
}
|
||||
- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
|
||||
return kGetScaleWidth(30);
|
||||
return kGetScaleWidth(40);
|
||||
}
|
||||
- (UIView *)viewForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
|
||||
return self.titleView;
|
||||
@@ -342,7 +596,6 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
return self.view;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - JXPagerMainTableViewGestureDelegate
|
||||
- (BOOL)mainTableViewGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
|
||||
//禁止categoryView左右滑动的时候,上下和左右都可以滚动
|
||||
@@ -389,6 +642,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
///获取所有的tag成功
|
||||
- (void)getHomeTagListSuccess:(NSArray<PIHomeCategoryTitleModel *> *)array{
|
||||
if(array.count == 0) {
|
||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||
return;
|
||||
}
|
||||
NSMutableArray *list = [NSMutableArray new];
|
||||
@@ -403,11 +657,18 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
}
|
||||
self.tagModelList = list;
|
||||
|
||||
|
||||
self.titleView.titles = titleArray;
|
||||
[self.titleView reloadData];
|
||||
|
||||
|
||||
[self createTagScrollView];
|
||||
[self.categoryTagList setTabArray:list];
|
||||
}
|
||||
|
||||
- (void)getHomeTagListFailure {
|
||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||
}
|
||||
|
||||
- (void)homeChatPickSuccess:(NSString *)uid {
|
||||
/// 跳聊天
|
||||
NSString *sessionId = uid;
|
||||
@@ -521,17 +782,11 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
_titleView.cellSpacing = kGetScaleWidth(20);
|
||||
|
||||
_titleView.listContainer = (id<JXCategoryViewListContainer>)self.pagingView.listContainerView;
|
||||
|
||||
// JXCategoryIndicatorImageView * indicator = [[JXCategoryIndicatorImageView alloc] init];
|
||||
// indicator.indicatorImageView.image = kImage(@"ms_login_choose_phone_icon");
|
||||
// indicator.indicatorImageViewSize = CGSizeMake(kGetScaleWidth(24), kGetScaleWidth(24));
|
||||
// indicator.verticalMargin = -kGetScaleWidth(4);
|
||||
// indicator.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// _titleView.indicators = @[indicator];
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
|
||||
|
||||
- (NSMutableArray<PIHomeCategoryTitleModel *> *)tagModelList{
|
||||
if(!_tagModelList){
|
||||
_tagModelList = [NSMutableArray array];
|
||||
@@ -578,4 +833,21 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
return _validListDict;
|
||||
}
|
||||
|
||||
- (HomeCategoryTabList *)categoryTagList {
|
||||
if (!_categoryTagList) {
|
||||
_categoryTagList = [[HomeCategoryTabList alloc] init];
|
||||
@kWeakify(self);
|
||||
[_categoryTagList setDidTapArrow:^{
|
||||
@kStrongify(self);
|
||||
[self showAllTags];
|
||||
}];
|
||||
[_categoryTagList setDidTapCategoryModel:^(PIHomeCategoryTitleModel *model) {
|
||||
@kStrongify(self);
|
||||
NSInteger index = [self.tagModelList indexOfObject:model];
|
||||
[self.titleView selectItemAtIndex:index];
|
||||
}];
|
||||
}
|
||||
return _categoryTagList;
|
||||
}
|
||||
@end
|
||||
|
@@ -1098,7 +1098,7 @@ GiftAnimationDelegate>
|
||||
|
||||
#pragma mark - 进房动画 XXX来了
|
||||
- (void)userEnterRoom:(NIMChatroomNotificationContent *)content ext:(XPMessageRemoteExtModel *)extModel {
|
||||
NSString *userName = content.source.nick;
|
||||
NSString *userName = [NSString isEmpty:extModel.nick] ? content.source.nick : extModel.nick;
|
||||
if ([NSString isEmpty:userName] && content.source.userId.intValue == self.delegate.getUserInfo.uid) {
|
||||
userName = self.delegate.getUserInfo.nick;
|
||||
} else if ([NSString isEmpty:userName]) {
|
||||
@@ -1695,21 +1695,6 @@ GiftAnimationDelegate>
|
||||
}
|
||||
|
||||
#pragma mark - 全服礼物 飘屏
|
||||
- (void)receiveBroadcastGift:(AttachmentModel *)attachment {
|
||||
if ([self isInSudGame]) {return;}
|
||||
GiftReceiveInfoModel *giftNotifyInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
|
||||
///年度飘屏是广播 在tabbar中监听
|
||||
if (giftNotifyInfo.ceremonyGift)return;
|
||||
// if(giftNotifyInfo.isHomeShow == YES)return; ///房间外飘屏 在tabbar中监听
|
||||
// if(giftNotifyInfo.roomUid == self.delegate.getRoomInfo.uid)return; ///自己的房间跨房间飘屏不用走
|
||||
if (self.animationListA.count == 0 &&
|
||||
self.isPlayOfB == NO &&
|
||||
self.isPlayOfA == NO) {
|
||||
[self createGiftBroadcastViewAnimation:giftNotifyInfo];
|
||||
}
|
||||
[self.animationListA addObject:giftNotifyInfo];
|
||||
}
|
||||
|
||||
- (void)createGiftBroadcastViewAnimation:(GiftReceiveInfoModel *)giftModel {
|
||||
self.isPlayOfA = YES;
|
||||
XPRoomGiftBroadcastView * view = [[XPRoomGiftBroadcastView alloc] init];
|
||||
|
@@ -70,6 +70,7 @@
|
||||
#import "XPAnchorPKFinishView.h"
|
||||
#import "XPSendGiftView.h"
|
||||
#import "XPUserCardViewController.h"
|
||||
#import "UserRoomCardViewController.h"
|
||||
#import "XPRoomViewController.h"
|
||||
#import "AcrossRoomPKPrizeModel.h"
|
||||
#import "XPMineUserInfoViewController.h"
|
||||
@@ -1139,8 +1140,10 @@
|
||||
model.roomInfo = roomInfo;
|
||||
model.micQueue = self.delegate.getMicroQueue;
|
||||
model.superMangerList = self.delegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.delegate.getCurrentNav presentViewController:userCardVC animated:NO completion:nil];
|
||||
|
||||
UserRoomCardViewController *vc = [[UserRoomCardViewController alloc] initWithUser:model];
|
||||
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.delegate.getCurrentNav presentViewController:vc animated:NO completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - XPAnchorPkPanelViewDelegate
|
||||
|
@@ -82,6 +82,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey;
|
||||
|
||||
@property(nonatomic, assign) BOOL isOnMic;
|
||||
|
||||
@property(nonatomic, strong) UIButton *closeMicControlButton;
|
||||
@end
|
||||
|
||||
|
||||
@@ -233,11 +234,16 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey;
|
||||
[self hideMicControlMenu];
|
||||
return;
|
||||
} else {
|
||||
if (!self.closeMicControlButton.superview) {
|
||||
[self.stackView insertSubview:self.closeMicControlButton atIndex:0];
|
||||
[self.closeMicControlButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.stackView);
|
||||
}];
|
||||
}
|
||||
self.isDisplayMicStatusControl = YES;
|
||||
}
|
||||
self.defaultVoiceVolume = [[RtcManager instance] loadUserSound] > 0 ? [[RtcManager instance] loadUserSound] : 50;
|
||||
|
||||
|
||||
@kWeakify(self);
|
||||
[self _micControlButton:self.micButton_open isShow:YES complete:^{
|
||||
@kStrongify(self);
|
||||
@@ -246,7 +252,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey;
|
||||
@kStrongify(self);
|
||||
[self _micControlButton:self.micButton_close_butMusic isShow:YES complete:^{
|
||||
if (self.updateHeight) {
|
||||
self.updateHeight(180);
|
||||
self.updateHeight(KScreenWidth);
|
||||
}
|
||||
}];
|
||||
}];
|
||||
@@ -255,6 +261,8 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey;
|
||||
|
||||
- (void)hideMicControlMenu {
|
||||
self.isDisplayMicStatusControl = NO;
|
||||
|
||||
[self.closeMicControlButton removeFromSuperview];
|
||||
|
||||
@kWeakify(self);
|
||||
[self _micControlButton:self.micButton_close_butMusic isShow:NO complete:^{
|
||||
@@ -444,6 +452,9 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey;
|
||||
[self.moreButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(36);
|
||||
}];
|
||||
[self.arrangeMicButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(36);
|
||||
}];
|
||||
|
||||
[self.giftButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(46, 46));
|
||||
@@ -547,6 +558,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey;
|
||||
self.isOnMic = NO;
|
||||
self.micButton.hidden = YES;
|
||||
self.faceButton.hidden = YES;
|
||||
[self hideMicControlMenu];
|
||||
}
|
||||
|
||||
[self updateMoreRedDotState];
|
||||
@@ -878,4 +890,14 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey;
|
||||
}
|
||||
return _baiShunGameButton;
|
||||
}
|
||||
|
||||
- (UIButton *)closeMicControlButton {
|
||||
if (!_closeMicControlButton) {
|
||||
_closeMicControlButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
// _closeMicControlButton.backgroundColor = [UIColor colorWithWhite:1 alpha:0.5];
|
||||
[_closeMicControlButton addTarget:self action:@selector(hideMicControlMenu) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _closeMicControlButton;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -45,7 +45,6 @@
|
||||
#import "TreasureFailryMessageModel.h"
|
||||
#import "NetImageView.h"
|
||||
|
||||
#import "XPUserCardViewController.h"
|
||||
#import "XPRoomTopicAlertView.h"
|
||||
#import "XPRoomSendTextView.h"
|
||||
#import "XPRoomPKResultView.h"
|
||||
@@ -56,6 +55,7 @@
|
||||
#import "QEmotionHelper.h"
|
||||
|
||||
#import "BoomInfoModel.h"
|
||||
#import "UserRoomCardViewController.h"
|
||||
|
||||
@implementation XPRoomMessageParser
|
||||
|
||||
@@ -1349,8 +1349,9 @@
|
||||
model.roomInfo = roomInfo;
|
||||
model.delegate = self.hostDelegate;
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
|
||||
|
||||
UserRoomCardViewController *vc = [[UserRoomCardViewController alloc] initWithUser:model];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:vc animated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - private base methods
|
||||
|
@@ -1014,7 +1014,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
self.isMiniEnter = NO;
|
||||
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
|
||||
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
|
||||
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
|
||||
if (content.eventType == NIMChatroomEventTypeEnter) {
|
||||
|
||||
if (roomInfo.isCloseScreen) {
|
||||
|
@@ -21,10 +21,6 @@
|
||||
@property (nonatomic,strong) UILabel *nickLabel;
|
||||
///标签
|
||||
@property (nonatomic,strong) NetImageView *tagImageView;
|
||||
///显示🔥
|
||||
@property (nonatomic,strong) UIImageView *hotImageView;
|
||||
///显示在线人数
|
||||
@property (nonatomic,strong) UILabel *numberLabel;
|
||||
|
||||
@end
|
||||
|
||||
@@ -45,8 +41,6 @@
|
||||
[self addSubview:self.avatarImageView];
|
||||
[self addSubview:self.nickLabel];
|
||||
[self addSubview:self.tagImageView];
|
||||
[self addSubview:self.hotImageView];
|
||||
[self addSubview:self.numberLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -63,20 +57,9 @@
|
||||
}];
|
||||
[self.tagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.nickLabel);
|
||||
make.top.mas_equalTo(self.nickLabel.mas_bottom).mas_offset(12);
|
||||
make.width.mas_equalTo(43);
|
||||
make.height.mas_equalTo(18);
|
||||
make.top.mas_equalTo(self.nickLabel.mas_bottom).mas_offset(12);
|
||||
}];
|
||||
[self.hotImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.tagImageView.mas_trailing).mas_offset(12);
|
||||
make.width.height.mas_equalTo(13);
|
||||
make.centerY.mas_equalTo(self.tagImageView);
|
||||
}];
|
||||
[self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.hotImageView.mas_trailing).mas_offset(3);
|
||||
make.centerY.mas_equalTo(self.tagImageView);
|
||||
make.trailing.mas_equalTo(0);
|
||||
make.height.mas_equalTo(12);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
@@ -84,8 +67,20 @@
|
||||
_model = model;
|
||||
self.avatarImageView.imageUrl = model.avatar;
|
||||
self.nickLabel.text = model.title;
|
||||
self.tagImageView.imageUrl = model.tagPict;
|
||||
self.numberLabel.text = [NSString stringWithFormat:@"%ld", model.onlineNum];
|
||||
self.tagImageView.hidden = [NSString isEmpty:model.tagPict];
|
||||
if (! [NSString isEmpty:model.tagPict]) {
|
||||
@kWeakify(self);
|
||||
[self.tagImageView loadImageWithUrl:model.tagPict completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
@kStrongify(self);
|
||||
if (image) {
|
||||
self.tagImageView.image = image;
|
||||
[self.tagImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(image.size.width/image.size.height * 18);
|
||||
}];
|
||||
[self layoutIfNeeded];
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
@@ -108,15 +103,6 @@
|
||||
return _tagImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)hotImageView {
|
||||
if (!_hotImageView) {
|
||||
_hotImageView = [[UIImageView alloc] init];
|
||||
_hotImageView.userInteractionEnabled = YES;
|
||||
_hotImageView.image = [UIImage imageNamed:@"room_like_collect_room_hot"];
|
||||
}
|
||||
return _hotImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
@@ -126,13 +112,5 @@
|
||||
return _nickLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)numberLabel {
|
||||
if (!_numberLabel) {
|
||||
_numberLabel = [[UILabel alloc] init];
|
||||
_numberLabel.font = [UIFont systemFontOfSize:12];
|
||||
_numberLabel.textColor = [UIColor whiteColor];
|
||||
}
|
||||
return _numberLabel;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -106,7 +106,6 @@
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
|
||||
[self.giftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView).offset(18);
|
||||
make.centerX.mas_equalTo(self.contentView);
|
||||
|
@@ -35,8 +35,12 @@
|
||||
-(void)setGiftModel:(GiftInfoModel *)giftModel{
|
||||
_giftModel = giftModel;
|
||||
_bgImageView.imageUrl = _giftModel.bannerUrl;
|
||||
|
||||
}
|
||||
-(void)clickBtnAction{
|
||||
if ([NSString isEmpty:_giftModel.bannerUrl]) {
|
||||
return;
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(pIGiftSuperGiftBroadcastViewClickWithModel:)]){
|
||||
[self.delegate pIGiftSuperGiftBroadcastViewClickWithModel:self.giftModel];
|
||||
}
|
||||
|
@@ -633,6 +633,9 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
}
|
||||
#pragma mark - PIGiftSuperGiftBroadcastViewDelegate
|
||||
- (void)pIGiftSuperGiftBroadcastViewClickWithModel:(GiftInfoModel *)giftModel{
|
||||
if ([NSString isEmpty:giftModel.skipUrl]) {
|
||||
return;
|
||||
}
|
||||
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
|
||||
webView.url = giftModel.skipUrl;
|
||||
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
|
||||
|
@@ -26,10 +26,10 @@
|
||||
#import "XPRoomOnlineTableViewCell.h"
|
||||
#import "XPRoomRoleEmptyTableViewCell.h"
|
||||
///VC
|
||||
#import "XPUserCardViewController.h"
|
||||
#import "UserRoomCardViewController.h"
|
||||
#import "XPRoomSettingPresenter.h"
|
||||
#import "XPRoomSettingProtocol.h"
|
||||
@interface XPRoomOnLineViewController ()<XPUserCardViewControllerDelegate,UITableViewDelegate, UITableViewDataSource, NIMChatManagerDelegate,XPRoomSettingProtocol>
|
||||
@interface XPRoomOnLineViewController ()<UITableViewDelegate, UITableViewDataSource, NIMChatManagerDelegate,XPRoomSettingProtocol>
|
||||
///导航栏
|
||||
@property (nonatomic,strong) UIView * navView;
|
||||
///返回按钮
|
||||
@@ -225,9 +225,16 @@
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
model.micQueue = self.hostDelegate.getMicroQueue;
|
||||
model.hideSendGiftItem = YES;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
userCardVC.delegate = self;
|
||||
[self.navigationController presentViewController:userCardVC animated:YES completion:nil];
|
||||
UserRoomCardViewController *vc = [[UserRoomCardViewController alloc] initWithUser:model];
|
||||
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.hostDelegate.getCurrentNav presentViewController:vc animated:NO completion:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
@kWeakify(self);
|
||||
[[NSNotificationCenter defaultCenter] addObserverForName:@"PopAfterUserCardAction" object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * _Nonnull notification) {
|
||||
@kStrongify(self);
|
||||
[self clickChatAction];
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -25,8 +25,8 @@
|
||||
#import "XPUserCardInfoModel.h"
|
||||
///View
|
||||
#import "AnchorPKMicroView.h"
|
||||
#import "XPUserCardViewController.h"
|
||||
#import "XPAnchorRandomPKRuleView.h"
|
||||
#import "UserRoomCardViewController.h"
|
||||
|
||||
// 房主头像宽 58 + 光圈 5
|
||||
#define ownerWidth (85 + 5)
|
||||
@@ -263,9 +263,11 @@
|
||||
model.roomInfo = roomInfo;
|
||||
model.micQueue = self.getMicroQueue;
|
||||
model.delegate = self.hostDelegate;
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
UserRoomCardViewController *vc = [[UserRoomCardViewController alloc] initWithUser:model];
|
||||
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.hostDelegate.getCurrentNav presentViewController:vc animated:NO completion:nil];
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#import "AttachmentModel.h"
|
||||
///View
|
||||
#import "AnchorMicroView.h"
|
||||
#import "XPUserCardViewController.h"
|
||||
#import "UserRoomCardViewController.h"
|
||||
#import "XPRoomInviteUserViewController.h"
|
||||
|
||||
// 房主头像宽 150 + 光圈 5
|
||||
@@ -144,8 +144,11 @@
|
||||
model.micQueue = self.getMicroQueue;
|
||||
model.delegate = self.hostDelegate;
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
|
||||
|
||||
UserRoomCardViewController *vc = [[UserRoomCardViewController alloc] initWithUser:model];
|
||||
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.hostDelegate.getCurrentNav presentViewController:vc animated:NO completion:nil];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -266,6 +266,7 @@
|
||||
|
||||
- (void)userSpeaking {
|
||||
UserInfoModel * userInfo = self.microModel.userInfo;
|
||||
|
||||
if (!userInfo.micCircle.length) {
|
||||
[self.animationView startWaveAnimation];
|
||||
return;
|
||||
|
@@ -41,10 +41,13 @@
|
||||
if (self.isAnimationing) {
|
||||
return;
|
||||
}
|
||||
self.isAnimationing = YES;
|
||||
|
||||
if (self.isAnimationing) {
|
||||
[self.firstView.layer removeAllAnimations];
|
||||
}
|
||||
self.isAnimationing = YES;
|
||||
self.firstView.hidden = NO;
|
||||
[self animationWithLayer:self.firstView];
|
||||
|
||||
[self animationWithLayer:self.firstView];
|
||||
}
|
||||
///结束声波动画
|
||||
- (void)stopWaveAnimation {
|
||||
@@ -53,14 +56,12 @@
|
||||
[self.firstView.layer removeAllAnimations];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.firstView];
|
||||
self.firstView.hidden = YES;
|
||||
}
|
||||
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.firstView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
@@ -70,7 +71,7 @@
|
||||
- (void)animationWithLayer:(UIView *)view {
|
||||
int animtionDura = 1;
|
||||
POPBasicAnimation *animation2 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerScaleXY];
|
||||
animation2.beginTime = CACurrentMediaTime();
|
||||
animation2.beginTime = CACurrentMediaTime();
|
||||
animation2.duration = animtionDura;
|
||||
animation2.fromValue = [NSValue valueWithCGSize:CGSizeMake(1.f, 1.f)];
|
||||
animation2.toValue = [NSValue valueWithCGSize:CGSizeMake(1.4f, 1.4f)];
|
||||
|
16
YuMi/Modules/YMRoom/View/StageView/NineteenMicStageView.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// NineteenMicStageView.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/12.
|
||||
//
|
||||
|
||||
#import "StageView.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NineteenMicStageView : StageView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
131
YuMi/Modules/YMRoom/View/StageView/NineteenMicStageView.m
Normal file
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// NineteenMicStageView.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/12.
|
||||
//
|
||||
|
||||
#import "NineteenMicStageView.h"
|
||||
#import "ArabMicroView.h"
|
||||
|
||||
//第一行距离顶部
|
||||
#define firstRowTopMargin 60
|
||||
// 房主头像宽 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)
|
||||
|
||||
static const NSInteger kMicCountPerRow = 5;
|
||||
|
||||
@implementation NineteenMicStageView
|
||||
|
||||
- (NSInteger)countOfMicroView {
|
||||
return 19; // 麦位总数
|
||||
}
|
||||
|
||||
- (UIView<MicroViewProtocol> *)microViewForIndex:(NSInteger)index {
|
||||
UIView<MicroViewProtocol> *microView = [super microViewForIndex:index];
|
||||
return microView ?: [[ArabMicroView alloc] init];
|
||||
}
|
||||
|
||||
- (CGRect)rectForViewAtIndex:(NSInteger)index {
|
||||
if (index < 0 || index >= [self countOfMicroView]) {
|
||||
return CGRectZero;
|
||||
}
|
||||
|
||||
// 第一行(5列)
|
||||
if (index >= 0 && index < 5) {
|
||||
return [self calculateRectForRow:0 column:index columnsInRow:5];
|
||||
}
|
||||
|
||||
// 第二行(4列,居中)
|
||||
if (index >= 5 && index < 9) {
|
||||
return [self calculateRectForRow:1 column:index - 5 columnsInRow:4];
|
||||
}
|
||||
|
||||
// 第三行(4列,居中)
|
||||
if (index >= 9 && index < 13) {
|
||||
return [self calculateRectForRow:2 column:index - 9 columnsInRow:4];
|
||||
}
|
||||
|
||||
// 第四行(5列)
|
||||
if (index >= 13 && index < 18) {
|
||||
return [self calculateRectForRow:3 column:index - 13 columnsInRow:5];
|
||||
}
|
||||
|
||||
// 第五行(最后一个麦位,居中,尺寸为2倍)
|
||||
if (index == 18) {
|
||||
CGFloat x = (KScreenWidth - mcWidth * 1.5) / 2; // 水平方向居中
|
||||
// CGFloat y = firstRowTopMargin + (mcHeight + lineMargin) * 2 - mcHeight; // 垂直方向在第 2 和第 3 行交界
|
||||
CGFloat y = firstRowTopMargin + 1 * (mcHeight + lineMargin) + mcHeight/2;
|
||||
return CGRectMake(x, y, mcWidth * 1.5, mcHeight * 1.5);
|
||||
}
|
||||
|
||||
return CGRectZero;
|
||||
}
|
||||
|
||||
- (CGRect)calculateRectForRow:(NSInteger)row column:(NSInteger)column columnsInRow:(NSInteger)columnsInRow {
|
||||
// CGFloat totalWidth = columnsInRow * mcWidth + (columnsInRow - 1) * marginH; // 当前行的总宽度
|
||||
// CGFloat startX = (KScreenWidth - totalWidth) / 2; // 居中计算起点
|
||||
// CGFloat x = startX + column * (mcWidth + marginH);
|
||||
// CGFloat y = firstRowTopMargin + row * (mcHeight + lineMargin);
|
||||
// return CGRectMake(x, y, mcWidth, mcHeight);
|
||||
|
||||
CGFloat totalWidth = columnsInRow * mcWidth + (columnsInRow - 1) * marginH; // 当前行的总宽度
|
||||
CGFloat startX = (KScreenWidth - totalWidth) / 2; // 居中计算起点
|
||||
CGFloat x = 0;
|
||||
|
||||
if (row == 1 || row == 2) { // 特殊处理第 2、3 行
|
||||
if (column < 2) {
|
||||
// 第一、二列,从左侧开始布局
|
||||
x = paddingH + column * (mcWidth + marginH);
|
||||
} else {
|
||||
// 第三、四列,从右侧开始布局
|
||||
NSInteger reversedColumn = columnsInRow - 1 - column;
|
||||
x = KScreenWidth - paddingH - mcWidth - reversedColumn * (mcWidth + marginH);
|
||||
}
|
||||
} else {
|
||||
// 默认居中布局
|
||||
x = startX + column * (mcWidth + marginH);
|
||||
}
|
||||
|
||||
CGFloat y = firstRowTopMargin + row * (mcHeight + lineMargin);
|
||||
return CGRectMake(x, y, mcWidth, mcHeight);
|
||||
}
|
||||
|
||||
- (CGFloat)hightForStageView {
|
||||
CGFloat lastRowBottom = firstRowTopMargin + 3 * (mcHeight + lineMargin) + mcHeight;
|
||||
return lastRowBottom + lineMargin; // 加上最后的间距
|
||||
}
|
||||
|
||||
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
|
||||
NSInteger index = [self getIndexByUid:uid];
|
||||
return [self animationPointAtStageViewByIndex:index];
|
||||
}
|
||||
|
||||
- (CGPoint)animationPointAtStageViewByIndex:(NSInteger)index {
|
||||
if (index < 0 || index >= [self countOfMicroView]) {
|
||||
return CGPointZero;
|
||||
}
|
||||
|
||||
CGRect rect = [self rectForViewAtIndex:index];
|
||||
CGPoint center = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect));
|
||||
return [self convertPoint:center toView:nil];
|
||||
}
|
||||
|
||||
@end
|
@@ -37,9 +37,10 @@
|
||||
#import "RoomPKChooseUserModel.h"
|
||||
// Views
|
||||
#import "NetImageView.h"
|
||||
#import "XPUserCardViewController.h"
|
||||
#import "XPRoomInviteUserViewController.h"
|
||||
|
||||
#import "UserRoomCardViewController.h"
|
||||
|
||||
@interface StageView()<RtcDelegate>
|
||||
|
||||
/** 云信麦序的 position 和本类 index 的关系。
|
||||
@@ -353,73 +354,85 @@
|
||||
更新坑位的等级头饰
|
||||
*/
|
||||
- (void)updatePositionItemWithRoomOnMicGiftValue:(GiftValueInfoModel *)roomOnMicGiftValue{
|
||||
if (self.hostDelegate.getRoomInfo.type == RoomType_Anchor || self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) return;
|
||||
// 过滤礼物值为0的
|
||||
NSMutableArray <GiftValueDetailModel *> *validGifts = [NSMutableArray array];
|
||||
if (self.hostDelegate.getRoomInfo.type == RoomType_Anchor ||
|
||||
self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Step 1: 过滤有效礼物
|
||||
NSArray<GiftValueDetailModel *> *validGifts = [self filterValidGifts];
|
||||
if (validGifts.count == 0) return;
|
||||
|
||||
// Step 3: 排序
|
||||
NSArray<GiftValueDetailModel *> *sortedGifts = [self sortGiftsByValue:validGifts];
|
||||
|
||||
NSString *highest = nil;
|
||||
NSString *lowest = nil;
|
||||
|
||||
// 处理最高礼物值
|
||||
if (sortedGifts.count >= 1 && ![self hasDuplicateHighestValue:sortedGifts]) {
|
||||
highest = sortedGifts.firstObject.uid;
|
||||
}
|
||||
// 处理最低礼物值
|
||||
if (sortedGifts.count > 1 && ![self hasDuplicateLowestValue:sortedGifts]) {
|
||||
lowest = sortedGifts.lastObject.uid;
|
||||
}
|
||||
|
||||
// Step 4: 更新 UI
|
||||
[self updateMicroViewsWithHighest:highest lowest:lowest];
|
||||
}
|
||||
|
||||
// 筛选有效礼物值
|
||||
- (NSArray<GiftValueDetailModel *> *)filterValidGifts {
|
||||
NSMutableArray<GiftValueDetailModel *> *validGifts = [NSMutableArray array];
|
||||
|
||||
for (int i = 0; i < self.microViews.count; i++) {
|
||||
|
||||
UIView<MicroViewProtocol> * view = [self findMicroViewByIndex:i];
|
||||
UIView<MicroViewProtocol> *view = [self findMicroViewByIndex:i];
|
||||
[view hiddenPositionisHighLevel];
|
||||
long long value = [view getGiftValue];
|
||||
UserInfoModel *user = [view getUser];
|
||||
if(value > 0 && user.uid > 0){
|
||||
if (value > 0 && user.uid > 0) {
|
||||
GiftValueDetailModel *model = [GiftValueDetailModel new];
|
||||
model.giftValue = value;
|
||||
model.uid = @(user.uid).stringValue;
|
||||
[validGifts addObject:model];
|
||||
}
|
||||
}
|
||||
if (validGifts.count == 0) return;
|
||||
NSMutableArray <GiftValueDetailModel *> *newOnMicGifts = [NSMutableArray array];
|
||||
// 过滤厅主
|
||||
for (GiftValueDetailModel *value in validGifts) {
|
||||
for (MicroQueueModel *item in self.micQueue.allValues) {
|
||||
BOOL isOwnerPosition = item.microState.position == -1;
|
||||
if (!isOwnerPosition && item.userInfo.uid == value.uid.integerValue) {
|
||||
[newOnMicGifts addObject:value];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newOnMicGifts.count == 0) return;
|
||||
// 排序
|
||||
NSSortDescriptor *giftValueSortD = [NSSortDescriptor sortDescriptorWithKey:@"giftValue" ascending:NO];
|
||||
NSArray <GiftValueDetailModel *> *giftValuesSortArray = [[newOnMicGifts sortedArrayUsingDescriptors:@[giftValueSortD]] mutableCopy];
|
||||
NSString *highest = nil;
|
||||
NSString *lowest = nil;
|
||||
NSInteger sortArrayCount = giftValuesSortArray.count;
|
||||
if (sortArrayCount == 1) {
|
||||
highest = giftValuesSortArray.firstObject.uid;
|
||||
}else if (sortArrayCount == 2) {
|
||||
if (giftValuesSortArray.firstObject.giftValue != giftValuesSortArray.lastObject.giftValue) {
|
||||
highest = giftValuesSortArray.firstObject.uid;
|
||||
lowest = giftValuesSortArray.lastObject.uid;
|
||||
}
|
||||
}else{
|
||||
// 如果第一个和最后一个不相等
|
||||
if (giftValuesSortArray.firstObject.giftValue != giftValuesSortArray.lastObject.giftValue) {
|
||||
// 如果第一个和第二个不相等,则必有最高
|
||||
if (giftValuesSortArray.firstObject.giftValue != giftValuesSortArray[1].giftValue) {
|
||||
highest = giftValuesSortArray.firstObject.uid;
|
||||
}
|
||||
// 如果最后一个和倒数第二个不相等,则必有最低
|
||||
if (giftValuesSortArray.lastObject.giftValue != giftValuesSortArray[sortArrayCount-2].giftValue) {
|
||||
lowest = giftValuesSortArray.lastObject.uid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return validGifts;
|
||||
}
|
||||
|
||||
for (MicroQueueModel *item in self.micQueue.allValues) {
|
||||
if (highest && item.userInfo.uid == highest.integerValue) {
|
||||
UIView<MicroViewProtocol> * view = [self findMicroViewByUid:highest];
|
||||
[view updatePositionIsHighLevel:YES isShow:YES];
|
||||
continue;
|
||||
}
|
||||
if (lowest && item.userInfo.uid == lowest.integerValue) {
|
||||
UIView<MicroViewProtocol> * view = [self findMicroViewByUid:lowest];
|
||||
[view updatePositionIsHighLevel:NO isShow:YES];
|
||||
}
|
||||
}
|
||||
// 根据礼物值排序
|
||||
- (NSArray<GiftValueDetailModel *> *)sortGiftsByValue:(NSArray<GiftValueDetailModel *> *)gifts {
|
||||
NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"giftValue" ascending:NO];
|
||||
return [gifts sortedArrayUsingDescriptors:@[sortDescriptor]];
|
||||
}
|
||||
|
||||
// 检查是否存在相同最高值
|
||||
- (BOOL)hasDuplicateHighestValue:(NSArray<GiftValueDetailModel *> *)sortedGifts {
|
||||
if (sortedGifts.count < 2) return NO;
|
||||
return sortedGifts[0].giftValue == sortedGifts[1].giftValue;
|
||||
}
|
||||
|
||||
// 检查是否存在相同最低值
|
||||
- (BOOL)hasDuplicateLowestValue:(NSArray<GiftValueDetailModel *> *)sortedGifts {
|
||||
if (sortedGifts.count < 2) return NO;
|
||||
return sortedGifts[sortedGifts.count - 1].giftValue == sortedGifts[sortedGifts.count - 2].giftValue;
|
||||
}
|
||||
|
||||
// 更新视图
|
||||
- (void)updateMicroViewsWithHighest:(NSString *)highest lowest:(NSString *)lowest {
|
||||
for (MicroQueueModel *item in self.micQueue.allValues) {
|
||||
UIView<MicroViewProtocol> *view = nil;
|
||||
|
||||
if (highest && item.userInfo.uid == highest.integerValue) {
|
||||
view = [self findMicroViewByUid:highest];
|
||||
[view updatePositionIsHighLevel:YES isShow:YES];
|
||||
} else if (lowest && item.userInfo.uid == lowest.integerValue) {
|
||||
view = [self findMicroViewByUid:lowest];
|
||||
[view updatePositionIsHighLevel:NO isShow:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
@@ -819,6 +832,7 @@
|
||||
}
|
||||
|
||||
if (targetUid && targetUid.length > 0) {
|
||||
|
||||
XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init];
|
||||
model.uid = targetUid;
|
||||
model.position = position;
|
||||
@@ -829,9 +843,9 @@
|
||||
model.micQueue = self.micQueue;
|
||||
model.delegate = self.hostDelegate;
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:NO completion:nil];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"userCard"}];
|
||||
UserRoomCardViewController *vc = [[UserRoomCardViewController alloc] initWithUser:model];
|
||||
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.hostDelegate.getCurrentNav presentViewController:vc animated:NO completion:nil];
|
||||
return;
|
||||
}
|
||||
|
||||
|
18
YuMi/Modules/YMRoom/View/StageView/TwentyMicStageView.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// TwentyMicStageView.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/12/12.
|
||||
//
|
||||
|
||||
#import "StageView.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TwentyMicStageView : StageView
|
||||
|
||||
//- (instancetype)initWithRows:(NSInteger)rows columns:(NSInteger)columns;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|