diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 29ff6e33..be1b3507 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -374,6 +374,12 @@ E884C36C2743951B00E1EBED /* GiftReceiveInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E884C36B2743951B00E1EBED /* GiftReceiveInfoModel.m */; }; E884C36F2743AAC800E1EBED /* AttachmentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E884C36E2743AAC800E1EBED /* AttachmentModel.m */; }; E884C3722743AEDE00E1EBED /* CustomAttachmentDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = E884C3712743AEDE00E1EBED /* CustomAttachmentDecoder.m */; }; + E88863C3278E7BCC004BCFAB /* crossRoomPk_progress.svga in Resources */ = {isa = PBXBuildFile; fileRef = E88863C2278E7BCC004BCFAB /* crossRoomPk_progress.svga */; }; + E88863C6278EAFC3004BCFAB /* XPAcrossRoomPKResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = E88863C5278EAFC3004BCFAB /* XPAcrossRoomPKResultView.m */; }; + E88863C9278EBA43004BCFAB /* XPAcrossRoomPKForceEndResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = E88863C8278EBA43004BCFAB /* XPAcrossRoomPKForceEndResultView.m */; }; + E88863CC278EC336004BCFAB /* AcrossRoomPKPrizeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E88863CB278EC336004BCFAB /* AcrossRoomPKPrizeModel.m */; }; + E88863CF278EC393004BCFAB /* XPAcrossRoomPKPrizeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E88863CE278EC393004BCFAB /* XPAcrossRoomPKPrizeView.m */; }; + E88863D3278ED4C0004BCFAB /* Timestamp.m in Sources */ = {isa = PBXBuildFile; fileRef = E88863D2278ED4C0004BCFAB /* Timestamp.m */; }; E8899C7F27853B6A007944BE /* DatingMicroView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8899C7E27853B6A007944BE /* DatingMicroView.m */; }; E8899C822785A694007944BE /* DatingInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8899C812785A694007944BE /* DatingInfoModel.m */; }; E8899C852785CC69007944BE /* XPRoomDatingAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8899C842785CC69007944BE /* XPRoomDatingAnimationView.m */; }; @@ -1316,6 +1322,17 @@ E884C36E2743AAC800E1EBED /* AttachmentModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AttachmentModel.m; sourceTree = ""; }; E884C3702743AEDE00E1EBED /* CustomAttachmentDecoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CustomAttachmentDecoder.h; sourceTree = ""; }; E884C3712743AEDE00E1EBED /* CustomAttachmentDecoder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CustomAttachmentDecoder.m; sourceTree = ""; }; + E88863C2278E7BCC004BCFAB /* crossRoomPk_progress.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = crossRoomPk_progress.svga; sourceTree = ""; }; + E88863C4278EAFC3004BCFAB /* XPAcrossRoomPKResultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAcrossRoomPKResultView.h; sourceTree = ""; }; + E88863C5278EAFC3004BCFAB /* XPAcrossRoomPKResultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAcrossRoomPKResultView.m; sourceTree = ""; }; + E88863C7278EBA43004BCFAB /* XPAcrossRoomPKForceEndResultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAcrossRoomPKForceEndResultView.h; sourceTree = ""; }; + E88863C8278EBA43004BCFAB /* XPAcrossRoomPKForceEndResultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAcrossRoomPKForceEndResultView.m; sourceTree = ""; }; + E88863CA278EC336004BCFAB /* AcrossRoomPKPrizeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AcrossRoomPKPrizeModel.h; sourceTree = ""; }; + E88863CB278EC336004BCFAB /* AcrossRoomPKPrizeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AcrossRoomPKPrizeModel.m; sourceTree = ""; }; + E88863CD278EC393004BCFAB /* XPAcrossRoomPKPrizeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAcrossRoomPKPrizeView.h; sourceTree = ""; }; + E88863CE278EC393004BCFAB /* XPAcrossRoomPKPrizeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAcrossRoomPKPrizeView.m; sourceTree = ""; }; + E88863D1278ED4C0004BCFAB /* Timestamp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Timestamp.h; sourceTree = ""; }; + E88863D2278ED4C0004BCFAB /* Timestamp.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Timestamp.m; sourceTree = ""; }; E8899C7D27853B6A007944BE /* DatingMicroView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DatingMicroView.h; sourceTree = ""; }; E8899C7E27853B6A007944BE /* DatingMicroView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DatingMicroView.m; sourceTree = ""; }; E8899C802785A694007944BE /* DatingInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DatingInfoModel.h; sourceTree = ""; }; @@ -2148,6 +2165,7 @@ 180116F6279E8C3100F2CBC0 /* Date */, 9B17F71527BD14FF00440843 /* SVGAParserManager */, 9B8585F22788699400D7D5C6 /* KVO */, + E88863D0278ED4A0004BCFAB /* Timestamp */, E82D5C77276B25B000858D6D /* SpriteSheetManager */, E865964E2701A1A900846EBD /* StatisticsService */, E89DA6612700590A008483C1 /* IAPHelper */, @@ -3742,6 +3760,8 @@ E880B3A8278BD82300A83B0D /* AcrossRoomPKInfoModel.m */, E8D48251278D8228003C1D08 /* AcrossRoomPKPanelModel.h */, E8D48252278D8228003C1D08 /* AcrossRoomPKPanelModel.m */, + E88863CA278EC336004BCFAB /* AcrossRoomPKPrizeModel.h */, + E88863CB278EC336004BCFAB /* AcrossRoomPKPrizeModel.m */, ); path = Model; sourceTree = ""; @@ -3770,6 +3790,12 @@ E8D4824F278D68BA003C1D08 /* XPAcrpssRoomPKPanelView.m */, E8D48254278D83AE003C1D08 /* XPAcrossRoomPKPanelUserView.h */, E8D48255278D83AE003C1D08 /* XPAcrossRoomPKPanelUserView.m */, + E88863C4278EAFC3004BCFAB /* XPAcrossRoomPKResultView.h */, + E88863C5278EAFC3004BCFAB /* XPAcrossRoomPKResultView.m */, + E88863C7278EBA43004BCFAB /* XPAcrossRoomPKForceEndResultView.h */, + E88863C8278EBA43004BCFAB /* XPAcrossRoomPKForceEndResultView.m */, + E88863CD278EC393004BCFAB /* XPAcrossRoomPKPrizeView.h */, + E88863CE278EC393004BCFAB /* XPAcrossRoomPKPrizeView.m */, ); path = SubViews; sourceTree = ""; @@ -3802,6 +3828,15 @@ path = Tool; sourceTree = ""; }; + E88863D0278ED4A0004BCFAB /* Timestamp */ = { + isa = PBXGroup; + children = ( + E88863D1278ED4C0004BCFAB /* Timestamp.h */, + E88863D2278ED4C0004BCFAB /* Timestamp.m */, + ); + path = Timestamp; + sourceTree = ""; + }; E8899C7C27853B46007944BE /* Dating */ = { isa = PBXGroup; children = ( @@ -4034,6 +4069,7 @@ E8A1E45C276220B100B294CA /* Sources */ = { isa = PBXGroup; children = ( + E88863C2278E7BCC004BCFAB /* crossRoomPk_progress.svga */, E8937ABF276C3ECF00B2C7E1 /* enterroom */, E8DEC98927637EA50078CB70 /* candyTree_open.svga */, E8DEC98A27637EA50078CB70 /* candyTree_transform.svga */, @@ -4822,6 +4858,7 @@ E8A1E460276220DA00B294CA /* candyTree_banner.svga in Resources */, E8937ACA276C3EDE00B2C7E1 /* svga_member_in_lv50.svga in Resources */, E8937ACD276C3EDE00B2C7E1 /* svga_member_in_lv30.svga in Resources */, + E88863C3278E7BCC004BCFAB /* crossRoomPk_progress.svga in Resources */, E8A1E462276220DA00B294CA /* candyTree_light.svga in Resources */, E8937ACF276C99C300B2C7E1 /* Launch Screen.storyboard in Resources */, 9B0997A127F19D8A00EB8F14 /* README.md in Resources */, @@ -5063,6 +5100,8 @@ 189DD55A26DE39D200AB55B1 /* BaseMvpPresenter.m in Sources */, 9BC5C8F9277B02EA007C8719 /* Api+NobleCenter.m in Sources */, 180806D827293794001FD836 /* NSObject+MJExtension.m in Sources */, + E88863D3278ED4C0004BCFAB /* Timestamp.m in Sources */, + E88863CF278EC393004BCFAB /* XPAcrossRoomPKPrizeView.m in Sources */, 189DD6FF26E20E5900AB55B1 /* HttpRequestHelper.m in Sources */, E8788945273A55C200BF1D57 /* XPGiftInfoView.m in Sources */, 9BD63FAB277EE885006EB744 /* Api+RoomRadio.m in Sources */, @@ -5120,6 +5159,7 @@ E84BF7DD277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m in Sources */, E8E5E1A027C36E3F00F457D8 /* HomeBannerInfoModel.m in Sources */, E8EEB8F426FC2050007C6EBA /* SDBrowserImageView.m in Sources */, + E88863CC278EC336004BCFAB /* AcrossRoomPKPrizeModel.m in Sources */, E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */, 189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */, E8B846C226FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m in Sources */, @@ -5213,6 +5253,7 @@ E8E7DAEB2745158500C631CC /* XPGiftUserInfoModel.m in Sources */, E83DB487274670DA00D8CBD1 /* XPRoomGiftBroadCastModel.m in Sources */, 9BCF585C279909D7008401A4 /* XPSkillCardEditPropCell.m in Sources */, + E88863C6278EAFC3004BCFAB /* XPAcrossRoomPKResultView.m in Sources */, E8AC722C26F49580007D6E91 /* XPMineNotificaViewController.m in Sources */, 189DD52E26DE255300AB55B1 /* AppDelegate.m in Sources */, E83DB4842746661800D8CBD1 /* XPRoomGiftBroadcastView.m in Sources */, @@ -5408,6 +5449,7 @@ E8412FA92779C2ED006E1101 /* XPRoomSettingItemModel.m in Sources */, 9B92A3692798145000AD168F /* XPSkillCardTypeModel.m in Sources */, 189DD58F26DF97E700AB55B1 /* LoginPresenter.m in Sources */, + E88863C9278EBA43004BCFAB /* XPAcrossRoomPKForceEndResultView.m in Sources */, E896EFB22771C93B00AD2CC1 /* XPMineFriendNumberView.m in Sources */, 9BB5495F2782E9DB0090CD26 /* NobleAuthInfo.m in Sources */, E89DA67227008D59008483C1 /* WalletInfoModel.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_panel_small_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_panel_small_bg.imageset/Contents.json new file mode 100644 index 00000000..440a0059 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_panel_small_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_panel_small_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_panel_small_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_panel_small_bg.imageset/room_across_pk_panel_small_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_panel_small_bg.imageset/room_across_pk_panel_small_bg@2x.png new file mode 100644 index 00000000..ae256ac8 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_panel_small_bg.imageset/room_across_pk_panel_small_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_panel_small_bg.imageset/room_across_pk_panel_small_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_panel_small_bg.imageset/room_across_pk_panel_small_bg@3x.png new file mode 100644 index 00000000..8dcfef1f Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_panel_small_bg.imageset/room_across_pk_panel_small_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_bg.imageset/Contents.json new file mode 100644 index 00000000..b7fdea3a --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_prize_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_prize_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_bg.imageset/room_across_pk_prize_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_bg.imageset/room_across_pk_prize_bg@2x.png new file mode 100644 index 00000000..6a57f86c Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_bg.imageset/room_across_pk_prize_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_bg.imageset/room_across_pk_prize_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_bg.imageset/room_across_pk_prize_bg@3x.png new file mode 100644 index 00000000..9576ec08 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_bg.imageset/room_across_pk_prize_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_ko.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_ko.imageset/Contents.json new file mode 100644 index 00000000..03dd61ef --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_ko.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_prize_ko@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_prize_ko@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_ko.imageset/room_across_pk_prize_ko@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_ko.imageset/room_across_pk_prize_ko@2x.png new file mode 100644 index 00000000..1aa68c0b Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_ko.imageset/room_across_pk_prize_ko@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_ko.imageset/room_across_pk_prize_ko@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_ko.imageset/room_across_pk_prize_ko@3x.png new file mode 100644 index 00000000..ca106407 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_prize_ko.imageset/room_across_pk_prize_ko@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_bg.imageset/Contents.json new file mode 100644 index 00000000..de0bc07b --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_fail_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_fail_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_bg.imageset/room_across_pk_result_fail_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_bg.imageset/room_across_pk_result_fail_bg@2x.png new file mode 100644 index 00000000..540ae0bf Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_bg.imageset/room_across_pk_result_fail_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_bg.imageset/room_across_pk_result_fail_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_bg.imageset/room_across_pk_result_fail_bg@3x.png new file mode 100644 index 00000000..db230ff9 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_bg.imageset/room_across_pk_result_fail_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_close.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_close.imageset/Contents.json new file mode 100644 index 00000000..842aa6a2 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_close.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_fail_close@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_fail_close@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_close.imageset/room_across_pk_result_fail_close@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_close.imageset/room_across_pk_result_fail_close@2x.png new file mode 100644 index 00000000..4d268f3c Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_close.imageset/room_across_pk_result_fail_close@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_close.imageset/room_across_pk_result_fail_close@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_close.imageset/room_across_pk_result_fail_close@3x.png new file mode 100644 index 00000000..3aabd700 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_close.imageset/room_across_pk_result_fail_close@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_person_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_person_bg.imageset/Contents.json new file mode 100644 index 00000000..7a7372f4 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_person_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_fail_person_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_fail_person_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_person_bg.imageset/room_across_pk_result_fail_person_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_person_bg.imageset/room_across_pk_result_fail_person_bg@2x.png new file mode 100644 index 00000000..337f08b6 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_person_bg.imageset/room_across_pk_result_fail_person_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_person_bg.imageset/room_across_pk_result_fail_person_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_person_bg.imageset/room_across_pk_result_fail_person_bg@3x.png new file mode 100644 index 00000000..d2e32d33 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_fail_person_bg.imageset/room_across_pk_result_fail_person_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forcednd_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forcednd_bg.imageset/Contents.json new file mode 100644 index 00000000..6575d159 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forcednd_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_forcednd_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_forcednd_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forcednd_bg.imageset/room_across_pk_result_forcednd_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forcednd_bg.imageset/room_across_pk_result_forcednd_bg@2x.png new file mode 100644 index 00000000..625b5601 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forcednd_bg.imageset/room_across_pk_result_forcednd_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forcednd_bg.imageset/room_across_pk_result_forcednd_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forcednd_bg.imageset/room_across_pk_result_forcednd_bg@3x.png new file mode 100644 index 00000000..b4684c16 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forcednd_bg.imageset/room_across_pk_result_forcednd_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_blue_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_blue_bg.imageset/Contents.json new file mode 100644 index 00000000..916a1e57 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_blue_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_forceend_blue_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_forceend_blue_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_blue_bg.imageset/room_across_pk_result_forceend_blue_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_blue_bg.imageset/room_across_pk_result_forceend_blue_bg@2x.png new file mode 100644 index 00000000..dd5ac977 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_blue_bg.imageset/room_across_pk_result_forceend_blue_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_blue_bg.imageset/room_across_pk_result_forceend_blue_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_blue_bg.imageset/room_across_pk_result_forceend_blue_bg@3x.png new file mode 100644 index 00000000..23d0a904 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_blue_bg.imageset/room_across_pk_result_forceend_blue_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_pk_icon.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_pk_icon.imageset/Contents.json new file mode 100644 index 00000000..ff29902c --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_pk_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_forceend_pk_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_forceend_pk_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_pk_icon.imageset/room_across_pk_result_forceend_pk_icon@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_pk_icon.imageset/room_across_pk_result_forceend_pk_icon@2x.png new file mode 100644 index 00000000..4dcf9d30 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_pk_icon.imageset/room_across_pk_result_forceend_pk_icon@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_pk_icon.imageset/room_across_pk_result_forceend_pk_icon@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_pk_icon.imageset/room_across_pk_result_forceend_pk_icon@3x.png new file mode 100644 index 00000000..e62cabf0 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_pk_icon.imageset/room_across_pk_result_forceend_pk_icon@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_red_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_red_bg.imageset/Contents.json new file mode 100644 index 00000000..d989d343 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_red_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_forceend_red_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_forceend_red_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_red_bg.imageset/room_across_pk_result_forceend_red_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_red_bg.imageset/room_across_pk_result_forceend_red_bg@2x.png new file mode 100644 index 00000000..4ba22f1f Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_red_bg.imageset/room_across_pk_result_forceend_red_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_red_bg.imageset/room_across_pk_result_forceend_red_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_red_bg.imageset/room_across_pk_result_forceend_red_bg@3x.png new file mode 100644 index 00000000..d1eba2b3 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_forceend_red_bg.imageset/room_across_pk_result_forceend_red_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_pk_icon.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_pk_icon.imageset/Contents.json new file mode 100644 index 00000000..de472486 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_pk_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_pk_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_pk_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_pk_icon.imageset/room_across_pk_result_pk_icon@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_pk_icon.imageset/room_across_pk_result_pk_icon@2x.png new file mode 100644 index 00000000..e6820065 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_pk_icon.imageset/room_across_pk_result_pk_icon@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_pk_icon.imageset/room_across_pk_result_pk_icon@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_pk_icon.imageset/room_across_pk_result_pk_icon@3x.png new file mode 100644 index 00000000..943e827c Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_pk_icon.imageset/room_across_pk_result_pk_icon@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_red_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_red_bg.imageset/Contents.json new file mode 100644 index 00000000..c4bfa4be --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_red_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_red_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_red_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_red_bg.imageset/room_across_pk_result_red_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_red_bg.imageset/room_across_pk_result_red_bg@2x.png new file mode 100644 index 00000000..ca8668a2 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_red_bg.imageset/room_across_pk_result_red_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_red_bg.imageset/room_across_pk_result_red_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_red_bg.imageset/room_across_pk_result_red_bg@3x.png new file mode 100644 index 00000000..1142b138 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_red_bg.imageset/room_across_pk_result_red_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_bg.imageset/Contents.json new file mode 100644 index 00000000..7ad54c1a --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_tie_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_tie_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_bg.imageset/room_across_pk_result_tie_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_bg.imageset/room_across_pk_result_tie_bg@2x.png new file mode 100644 index 00000000..756518fb Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_bg.imageset/room_across_pk_result_tie_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_bg.imageset/room_across_pk_result_tie_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_bg.imageset/room_across_pk_result_tie_bg@3x.png new file mode 100644 index 00000000..470982f5 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_bg.imageset/room_across_pk_result_tie_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_close.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_close.imageset/Contents.json new file mode 100644 index 00000000..ca15d04f --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_close.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_tie_close@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_tie_close@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_close.imageset/room_across_pk_result_tie_close@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_close.imageset/room_across_pk_result_tie_close@2x.png new file mode 100644 index 00000000..b0fc0421 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_close.imageset/room_across_pk_result_tie_close@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_close.imageset/room_across_pk_result_tie_close@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_close.imageset/room_across_pk_result_tie_close@3x.png new file mode 100644 index 00000000..dc41ccda Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_close.imageset/room_across_pk_result_tie_close@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_person_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_person_bg.imageset/Contents.json new file mode 100644 index 00000000..dd3c7665 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_person_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_tie_person_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_tie_person_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_person_bg.imageset/room_across_pk_result_tie_person_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_person_bg.imageset/room_across_pk_result_tie_person_bg@2x.png new file mode 100644 index 00000000..7af16dce Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_person_bg.imageset/room_across_pk_result_tie_person_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_person_bg.imageset/room_across_pk_result_tie_person_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_person_bg.imageset/room_across_pk_result_tie_person_bg@3x.png new file mode 100644 index 00000000..1ac4cce2 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_tie_person_bg.imageset/room_across_pk_result_tie_person_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_bg.imageset/Contents.json new file mode 100644 index 00000000..854fe193 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_win_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_win_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_bg.imageset/room_across_pk_result_win_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_bg.imageset/room_across_pk_result_win_bg@2x.png new file mode 100644 index 00000000..7e2bf735 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_bg.imageset/room_across_pk_result_win_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_bg.imageset/room_across_pk_result_win_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_bg.imageset/room_across_pk_result_win_bg@3x.png new file mode 100644 index 00000000..79942061 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_bg.imageset/room_across_pk_result_win_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_blue_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_blue_bg.imageset/Contents.json new file mode 100644 index 00000000..4503f94d --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_blue_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_win_blue_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_win_blue_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_blue_bg.imageset/room_across_pk_result_win_blue_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_blue_bg.imageset/room_across_pk_result_win_blue_bg@2x.png new file mode 100644 index 00000000..d3dde0d9 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_blue_bg.imageset/room_across_pk_result_win_blue_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_blue_bg.imageset/room_across_pk_result_win_blue_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_blue_bg.imageset/room_across_pk_result_win_blue_bg@3x.png new file mode 100644 index 00000000..d9bc1130 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_blue_bg.imageset/room_across_pk_result_win_blue_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_close.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_close.imageset/Contents.json new file mode 100644 index 00000000..7932d6d8 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_close.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_win_close@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_win_close@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_close.imageset/room_across_pk_result_win_close@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_close.imageset/room_across_pk_result_win_close@2x.png new file mode 100644 index 00000000..b4b8ee73 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_close.imageset/room_across_pk_result_win_close@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_close.imageset/room_across_pk_result_win_close@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_close.imageset/room_across_pk_result_win_close@3x.png new file mode 100644 index 00000000..d56a03b5 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_close.imageset/room_across_pk_result_win_close@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_icon.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_icon.imageset/Contents.json new file mode 100644 index 00000000..386f9876 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_win_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_win_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_icon.imageset/room_across_pk_result_win_icon@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_icon.imageset/room_across_pk_result_win_icon@2x.png new file mode 100644 index 00000000..540e5099 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_icon.imageset/room_across_pk_result_win_icon@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_icon.imageset/room_across_pk_result_win_icon@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_icon.imageset/room_across_pk_result_win_icon@3x.png new file mode 100644 index 00000000..bb150fdb Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_icon.imageset/room_across_pk_result_win_icon@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_person_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_person_bg.imageset/Contents.json new file mode 100644 index 00000000..c49b122b --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_person_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_across_pk_result_win_person_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_across_pk_result_win_person_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_person_bg.imageset/room_across_pk_result_win_person_bg@2x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_person_bg.imageset/room_across_pk_result_win_person_bg@2x.png new file mode 100644 index 00000000..7231d7ed Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_person_bg.imageset/room_across_pk_result_win_person_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_person_bg.imageset/room_across_pk_result_win_person_bg@3x.png b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_person_bg.imageset/room_across_pk_result_win_person_bg@3x.png new file mode 100644 index 00000000..4418d8be Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/AcrossRoomPK/room_across_pk_result_win_person_bg.imageset/room_across_pk_result_win_person_bg@3x.png differ diff --git a/xplan-ios/Base/Tool/Timestamp/Timestamp.h b/xplan-ios/Base/Tool/Timestamp/Timestamp.h new file mode 100644 index 00000000..35f7effc --- /dev/null +++ b/xplan-ios/Base/Tool/Timestamp/Timestamp.h @@ -0,0 +1,20 @@ +// +// Timestamp.h +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface Timestamp : NSObject +/// 获取当前的时间戳 +/// @param succes 成功 +/// @param failure 失败 ++ (void)getInternetDateWithSuccess:(void(^)(NSTimeInterval timeInterval))succes + failure:(void(^)(NSError *error))failure; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Base/Tool/Timestamp/Timestamp.m b/xplan-ios/Base/Tool/Timestamp/Timestamp.m new file mode 100644 index 00000000..d66b6a1c --- /dev/null +++ b/xplan-ios/Base/Tool/Timestamp/Timestamp.m @@ -0,0 +1,68 @@ +// +// Timestamp.m +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// + +#import "Timestamp.h" +#import "ApiHost.h" + +@implementation Timestamp +/// 获取当前的时间戳 +/// @param succes 成功 +/// @param failure 失败 ++ (void)getInternetDateWithSuccess:(void(^)(NSTimeInterval timeInterval))succes + failure:(void(^)(NSError *error))failure{ + //1.创建URL + NSString *urlString = API_HOST_URL; + urlString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; + //2.创建request请求对象 + NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; + [request setURL:[NSURL URLWithString: urlString]]; + [request setCachePolicy:NSURLRequestReloadIgnoringCacheData]; + [request setTimeoutInterval:5]; + [request setHTTPShouldHandleCookies:FALSE]; + [request setHTTPMethod:@"GET"]; + //3.创建URLSession对象 + NSURLSession *session = [NSURLSession sharedSession]; + //4.设置数据返回回调的block + NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (error == nil && response != nil) { + //这么做的原因是简体中文下的手机不能识别“MMM”,只能识别“MM” + NSArray *monthEnglishArray = @[@"Jan",@"Feb",@"Mar",@"Apr",@"May",@"Jun",@"Jul",@"Aug",@"Sept",@"Sep",@"Oct",@"Nov",@"Dec"]; + NSArray *monthNumArray = @[@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"09",@"10",@"11",@"12"]; + NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; + NSDictionary *allHeaderFields = [httpResponse allHeaderFields]; + NSString *dateStr = [allHeaderFields objectForKey:@"Date"]; + dateStr = [dateStr substringFromIndex:5]; + dateStr = [dateStr substringToIndex:[dateStr length]-4]; + dateStr = [dateStr stringByAppendingString:@" +0000"]; + //当前语言是中文的话,识别不了英文缩写 + for (NSInteger i = 0 ; i < monthEnglishArray.count ; i++) { + NSString *monthEngStr = monthEnglishArray[i]; + NSString *monthNumStr = monthNumArray[i]; + dateStr = [dateStr stringByReplacingOccurrencesOfString:monthEngStr withString:monthNumStr]; + + } + NSDateFormatter *dMatter = [[NSDateFormatter alloc] init]; + [dMatter setDateFormat:@"dd MM yyyy HH:mm:ss Z"]; + NSDate *netDate = [dMatter dateFromString:dateStr]; + NSTimeInterval timeInterval = [netDate timeIntervalSince1970]; + dispatch_async(dispatch_get_main_queue(), ^{ + succes(timeInterval); + }); + + }else{ + dispatch_async(dispatch_get_main_queue(), ^{ + failure(error); + }); + + } + + }]; + //5、执行网络请求 + [task resume]; + +} +@end diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.h b/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.h new file mode 100644 index 00000000..1e25a857 --- /dev/null +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.h @@ -0,0 +1,29 @@ +// +// AcrossRoomPKPrizeModel.h +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AcrossRoomPKPrizeModel : NSObject +///赢方UID +@property (nonatomic, copy) NSString * winUid; +///输方UID +@property (nonatomic, copy) NSString * failUid; +///赢方头像 +@property (nonatomic, copy) NSString *winAvatar; +///输方头像 +@property (nonatomic, copy) NSString *failAvatar; +///赢方标题 +@property (nonatomic, copy) NSString *winTitle; +///输方标题 +@property (nonatomic, copy) NSString *failTitle; +///描述 +@property (nonatomic, copy) NSString *msg; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.m b/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.m new file mode 100644 index 00000000..75fc90e0 --- /dev/null +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.m @@ -0,0 +1,12 @@ +// +// AcrossRoomPKPrizeModel.m +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// + +#import "AcrossRoomPKPrizeModel.h" + +@implementation AcrossRoomPKPrizeModel + +@end diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKForceEndResultView.h b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKForceEndResultView.h new file mode 100644 index 00000000..c961f91d --- /dev/null +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKForceEndResultView.h @@ -0,0 +1,16 @@ +// +// XPAcrossRoomPKForceEndResultView.h +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class AcrossRoomPKPanelModel; +@interface XPAcrossRoomPKForceEndResultView : UIView +@property (nonatomic, strong) AcrossRoomPKPanelModel *data; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKForceEndResultView.m b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKForceEndResultView.m new file mode 100644 index 00000000..7e6e354a --- /dev/null +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKForceEndResultView.m @@ -0,0 +1,279 @@ +// +// XPAcrossRoomPKForceEndResultView.m +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// + +#import "XPAcrossRoomPKForceEndResultView.h" +///Third +#import +///Tool +#import "ThemeColor.h" +#import "NetImageView.h" +#import "TTPopup.h" +///Model +#import "AcrossRoomPKPanelModel.h" + +@interface XPAcrossRoomPKForceEndResultView() + +/** bgImageView */ +@property (nonatomic, strong) UIImageView *bgImageView; +///关闭 +@property (nonatomic, strong) UIButton *closeBtn; +///标题 +@property (nonatomic, strong) UILabel *titleLabel; +///红队背景 +@property (nonatomic, strong) UIImageView *redBgImageView; +///红队头像 +@property (nonatomic, strong) NetImageView *redHeadImageView; +///红队厅名 +@property (nonatomic, strong) UILabel *redRoomTitleLabel; +///红队礼物值 +@property (nonatomic, strong) UILabel *redValueLabel; +///中间PKicon +@property (nonatomic, strong) UIImageView *middleImageView; +///蓝队背景 +@property (nonatomic, strong) UIImageView *blueBgImageView; +///蓝队赢icon +@property (nonatomic, strong) UIImageView *blueWinIconView; +///蓝队头像 +@property (nonatomic, strong) NetImageView *blueHeadImageView; +///蓝队厅名 +@property (nonatomic, strong) UILabel *blueRoomTitleLabel; +///蓝队礼物值 +@property (nonatomic, strong) UILabel *blueValueLabel; + +@end + +@implementation XPAcrossRoomPKForceEndResultView + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self initView]; + [self initConstrations]; + } + return self; +} + +- (void)initView { + [self addSubview:self.bgImageView]; + [self addSubview:self.closeBtn]; + [self addSubview:self.titleLabel]; + + [self addSubview:self.redBgImageView]; + [self addSubview:self.redHeadImageView]; + [self addSubview:self.redRoomTitleLabel]; + [self addSubview:self.redValueLabel]; + + [self addSubview:self.blueBgImageView]; + [self addSubview:self.blueHeadImageView]; + [self addSubview:self.blueRoomTitleLabel]; + [self addSubview:self.blueValueLabel]; + + [self addSubview:self.middleImageView]; + +} + +- (void)initConstrations { + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(0); + }]; + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self); + make.top.mas_equalTo(18); + make.height.mas_equalTo(18); + }]; + [self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(-17); + make.width.height.mas_equalTo(22); + make.centerY.mas_equalTo(self.titleLabel); + }]; + [self.redBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(55); + make.left.mas_equalTo(17); + make.width.mas_equalTo(133); + make.height.mas_equalTo(119); + }]; + [self.redHeadImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(75); + make.left.mas_equalTo(54); + make.width.height.mas_equalTo(52); + }]; + [self.redRoomTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.redHeadImageView.mas_bottom).mas_offset(8); + make.centerX.mas_equalTo(self.redHeadImageView); + make.height.mas_equalTo(12); + make.left.mas_equalTo(self.redBgImageView.mas_left).mas_offset(20); + }]; + [self.redValueLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.redHeadImageView); + make.top.mas_equalTo(self.redRoomTitleLabel.mas_bottom).offset(6); + make.height.mas_equalTo(12); + make.left.mas_equalTo(self.redBgImageView.mas_left).mas_offset(20); + }]; + [self.middleImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(87); + make.centerX.mas_equalTo(self); + make.width.mas_equalTo(62); + make.height.mas_equalTo(43); + }]; + [self.blueBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(61); + make.right.mas_equalTo(-17); + make.width.mas_equalTo(133); + make.height.mas_equalTo(119); + }]; + [self.blueHeadImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(81); + make.right.mas_equalTo(-54); + make.width.height.mas_equalTo(52); + }]; + [self.blueRoomTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.blueHeadImageView.mas_bottom).mas_offset(8); + make.centerX.mas_equalTo(self.blueHeadImageView); + make.height.mas_equalTo(12); + make.left.mas_equalTo(self.blueBgImageView.mas_left).mas_offset(16); + }]; + [self.blueValueLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.blueHeadImageView); + make.left.mas_equalTo(self.blueBgImageView.mas_left).mas_offset(16); + make.top.mas_equalTo(self.blueRoomTitleLabel.mas_bottom).offset(6); + make.height.mas_equalTo(12); + }]; +} + +- (void)setData:(AcrossRoomPKPanelModel *)data { + if (data) { + self.redHeadImageView.imageUrl = data.cAvatar; + self.blueHeadImageView.imageUrl = data.aAvatar; + self.redRoomTitleLabel.text = data.cTitle; + self.blueRoomTitleLabel.text = data.aTitle; + self.redValueLabel.text = [NSString stringWithFormat:@"%lld", data.cAmount]; + self.blueValueLabel.text = [NSString stringWithFormat:@"%lld", data.aAmount]; + } +} + +- (void)onCloseBtnClick:(UIButton *)btn { + [TTPopup dismiss]; +} + +#pragma mark - getters and setters +- (UIImageView *)bgImageView { + if (!_bgImageView) { + _bgImageView = [[UIImageView alloc] init]; + _bgImageView.image = [UIImage imageNamed:@"room_across_pk_result_forcednd_bg"]; + } + return _bgImageView; +} + +- (UIButton *)closeBtn { + if (!_closeBtn) { + _closeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_closeBtn addTarget:self action:@selector(onCloseBtnClick:) forControlEvents:UIControlEventTouchUpInside]; + [_closeBtn setImage:[UIImage imageNamed:@"room_across_pk_invite_result_close"] forState:UIControlStateNormal]; + } + return _closeBtn; +} + +- (UIImageView *)redBgImageView { + if (!_redBgImageView) { + _redBgImageView = [[UIImageView alloc] init]; + _redBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_forceend_red_bg"]; + } + return _redBgImageView; +} + +- (NetImageView *)redHeadImageView { + if (!_redHeadImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _redHeadImageView = [[NetImageView alloc] initWithConfig:config]; + _redHeadImageView.layer.cornerRadius = 26; + _redHeadImageView.layer.masksToBounds = YES; + _redHeadImageView.layer.borderWidth = 1; + _redHeadImageView.layer.borderColor = [UIColor whiteColor].CGColor; + } + return _redHeadImageView; +} + +- (UILabel *)redRoomTitleLabel { + if (!_redRoomTitleLabel) { + _redRoomTitleLabel = [[UILabel alloc] init]; + _redRoomTitleLabel.textColor = [UIColor whiteColor]; + _redRoomTitleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; + _redRoomTitleLabel.textAlignment = NSTextAlignmentCenter; + } + return _redRoomTitleLabel; +} +- (UILabel *)redValueLabel { + if (!_redValueLabel) { + _redValueLabel = [[UILabel alloc] init]; + _redValueLabel.textColor = [UIColor whiteColor]; + _redValueLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold]; + _redValueLabel.textAlignment = NSTextAlignmentCenter; + } + return _redValueLabel; +} + +- (UIImageView *)middleImageView { + if (!_middleImageView) { + _middleImageView = [[UIImageView alloc] init]; + _middleImageView.image = [UIImage imageNamed:@"room_across_pk_result_forceend_pk_icon"]; + } + return _middleImageView; +} + +- (UIImageView *)blueBgImageView { + if (!_blueBgImageView) { + _blueBgImageView = [[UIImageView alloc] init]; + _blueBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_forceend_blue_bg"]; + } + return _blueBgImageView; +} + +- (NetImageView *)blueHeadImageView { + if (!_blueHeadImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _blueHeadImageView = [[NetImageView alloc] initWithConfig:config]; + _blueHeadImageView.layer.cornerRadius = 26; + _blueHeadImageView.layer.masksToBounds = YES; + _blueHeadImageView.layer.borderWidth = 1; + _blueHeadImageView.layer.borderColor = [UIColor whiteColor].CGColor; + } + return _blueHeadImageView; +} + +- (UILabel *)blueRoomTitleLabel { + if (!_blueRoomTitleLabel) { + _blueRoomTitleLabel = [[UILabel alloc] init]; + _blueRoomTitleLabel.textColor = [UIColor whiteColor]; + _blueRoomTitleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; + _blueRoomTitleLabel.textAlignment = NSTextAlignmentCenter; + } + return _blueRoomTitleLabel; +} +- (UILabel *)blueValueLabel { + if (!_blueValueLabel) { + _blueValueLabel = [[UILabel alloc] init]; + _blueValueLabel.textColor = [UIColor whiteColor]; + _blueValueLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold]; + _blueValueLabel.textAlignment = NSTextAlignmentCenter; + } + return _blueValueLabel; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.textColor = [UIColor whiteColor]; + _titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold]; + _titleLabel.text = @"PK结束"; + } + return _titleLabel; +} + +@end diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelUserView.h b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelUserView.h index ce66e0c4..ac46d5a0 100644 --- a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelUserView.h +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelUserView.h @@ -24,7 +24,7 @@ typedef NS_ENUM(NSInteger, AcrossRoomPKPanelUserType) { ///类型 @property (nonatomic,assign) AcrossRoomPKPanelUserType type; -@property (nonatomic,strong) AcrossRoomPkRankModel * panelInfo; +@property (nonatomic,strong, nullable) AcrossRoomPkRankModel * panelInfo; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelUserView.m b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelUserView.m index 0a942b60..a792d802 100644 --- a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelUserView.m +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPanelUserView.m @@ -50,12 +50,13 @@ }]; [self.headwearImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.bottom.mas_equalTo(self); + make.left.right.centerY.mas_equalTo(self); make.height.mas_equalTo(38); }]; [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.bottom.mas_equalTo(self); + make.left.right.mas_equalTo(self); + make.bottom.mas_equalTo(self.headwearImageView); make.height.mas_equalTo(self.avatarImageView.mas_width); }]; @@ -96,7 +97,6 @@ self.headwearImageView.image = [UIImage imageNamed:headwearName]; self.avatarImageView.image = [UIImage imageNamed:avatarPlaceName]; [self.coinButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[coinColorStart, coinColorEnd] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; - CGFloat width = 32; if (self.tag == 1000) { self.headwearImageView.hidden = NO; } else { @@ -112,6 +112,10 @@ NSString * amount = _panelInfo.amount.length > 0 ? _panelInfo.amount : @""; [self.coinButton setTitle:amount forState:UIControlStateNormal]; self.coinButton.hidden = !amount; + } else { + self.avatarImageView.image = nil; + [self.coinButton setTitle:@"0" forState:UIControlStateNormal]; + self.coinButton.hidden = YES; } } @@ -130,6 +134,8 @@ config.imageType = ImageTypeUserIcon; config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; _avatarImageView = [[NetImageView alloc] initWithConfig:config]; + _avatarImageView.layer.masksToBounds = YES; + _avatarImageView.layer.cornerRadius = 32 / 2; } return _avatarImageView; } diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.h b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.h new file mode 100644 index 00000000..ed952510 --- /dev/null +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.h @@ -0,0 +1,16 @@ +// +// XPAcrossRoomPKPrizeView.h +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class AcrossRoomPKPrizeModel; +@interface XPAcrossRoomPKPrizeView : UIView +@property (nonatomic, strong) AcrossRoomPKPrizeModel *data; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.m b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.m new file mode 100644 index 00000000..4c8174cc --- /dev/null +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.m @@ -0,0 +1,211 @@ +// +// XPAcrossRoomPKPrizeView.m +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// 跨房PK横幅 + +#import "XPAcrossRoomPKPrizeView.h" +///Third +#import +///Tool +#import "ThemeColor.h" +#import "NetImageView.h" +#import "UIImage+Utils.h" +///Model +#import "AcrossRoomPKPrizeModel.h" + +@interface XPAcrossRoomPKPrizeView () + +/** bgImageView */ +@property (nonatomic, strong) UIImageView *bgImageView; +///去围观 +@property (nonatomic, strong) UIButton *onLookBtn; +///标题 +@property (nonatomic, strong) UILabel *titleLabel; +///红队头像 +@property (nonatomic, strong) NetImageView *redHeadImageView; +///红队厅名 +@property (nonatomic, strong) UILabel *redRoomTitleLabel; +///中间PKicon +@property (nonatomic, strong) UIImageView *middleImageView; +///蓝队头像 +@property (nonatomic, strong) NetImageView *blueHeadImageView; +///蓝队厅名 +@property (nonatomic, strong) UILabel *blueRoomTitleLabel; + +@end + +@implementation XPAcrossRoomPKPrizeView + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self initView]; + [self initConstrations]; + } + return self; +} + +- (void)initView { + [self addSubview:self.bgImageView]; + [self addSubview:self.onLookBtn]; + [self addSubview:self.titleLabel]; + + [self addSubview:self.redHeadImageView]; + [self addSubview:self.redRoomTitleLabel]; + + [self addSubview:self.blueHeadImageView]; + [self addSubview:self.blueRoomTitleLabel]; + + [self addSubview:self.middleImageView]; + +} + +- (void)initConstrations { + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(0); + }]; + [self.redHeadImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(12); + make.left.mas_equalTo(22); + make.width.height.mas_equalTo(44); + }]; + [self.redRoomTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.redHeadImageView.mas_bottom).mas_offset(8); + make.centerX.mas_equalTo(self.redHeadImageView); + make.height.mas_equalTo(12); + make.width.mas_equalTo(72); + }]; + [self.middleImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.redHeadImageView); + make.width.mas_equalTo(60); + make.height.mas_equalTo(40); + make.left.mas_equalTo(self.redHeadImageView.mas_right).mas_offset(9); + }]; + [self.blueHeadImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.redHeadImageView); + make.left.mas_equalTo(self.middleImageView.mas_right).mas_offset(9); + make.width.height.mas_equalTo(44); + }]; + [self.blueRoomTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.blueHeadImageView.mas_bottom).mas_offset(8); + make.centerX.mas_equalTo(self.blueHeadImageView); + make.height.mas_equalTo(12); + make.width.mas_equalTo(72); + }]; + [self.onLookBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(50); + make.height.mas_equalTo(18); + make.right.mas_equalTo(-14); + make.bottom.mas_equalTo(-14); + }]; + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.redHeadImageView); + make.right.mas_equalTo(self.onLookBtn); + make.height.mas_equalTo(14); + make.left.mas_equalTo(self.blueHeadImageView.mas_right).mas_offset(20); + }]; +} + +- (void)setData:(AcrossRoomPKPrizeModel *)data { + _data = data; + self.redHeadImageView.imageUrl = data.winAvatar; + self.blueHeadImageView.imageUrl = data.failAvatar; + self.redRoomTitleLabel.text = data.winTitle; + self.blueRoomTitleLabel.text = data.failTitle; + self.titleLabel.text = data.msg; +} + +#pragma mark - getters and setters +- (UIImageView *)bgImageView { + if (!_bgImageView) { + _bgImageView = [[UIImageView alloc] init]; + _bgImageView.image = [UIImage imageNamed:@"room_across_pk_prize_bg"]; + } + return _bgImageView; +} + +- (UIButton *)onLookBtn { + if (!_onLookBtn) { + _onLookBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_onLookBtn setBackgroundImage:[UIImage imageWithColor:[ThemeColor disableButtonColor]] forState:UIControlStateNormal]; + [_onLookBtn setTitle:@"来围观" forState:UIControlStateNormal]; + [_onLookBtn setTitleColor:UIColorFromRGB(0xffffff) forState:UIControlStateNormal]; + _onLookBtn.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; + _onLookBtn.userInteractionEnabled = NO; + _onLookBtn.layer.masksToBounds = YES; + _onLookBtn.layer.cornerRadius = 9; + _onLookBtn.layer.borderWidth = 1; + _onLookBtn.layer.borderColor = [UIColor whiteColor].CGColor; + } + return _onLookBtn; +} + +- (NetImageView *)redHeadImageView { + if (!_redHeadImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _redHeadImageView = [[NetImageView alloc] initWithConfig:config]; + _redHeadImageView.layer.cornerRadius = 22; + _redHeadImageView.layer.masksToBounds = YES; + _redHeadImageView.layer.borderWidth = 1; + _redHeadImageView.layer.borderColor = UIColorFromRGB(0xec677d).CGColor; + } + return _redHeadImageView; +} + +- (UILabel *)redRoomTitleLabel { + if (!_redRoomTitleLabel) { + _redRoomTitleLabel = [[UILabel alloc] init]; + _redRoomTitleLabel.textColor = [UIColor whiteColor]; + _redRoomTitleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium]; + _redRoomTitleLabel.textAlignment = NSTextAlignmentCenter; + } + return _redRoomTitleLabel; +} + +- (UIImageView *)middleImageView { + if (!_middleImageView) { + _middleImageView = [[UIImageView alloc] init]; + _middleImageView.image = [UIImage imageNamed:@"room_across_pk_prize_ko"]; + } + return _middleImageView; +} + +- (NetImageView *)blueHeadImageView { + if (!_blueHeadImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _blueHeadImageView = [[NetImageView alloc] initWithConfig:config]; + _blueHeadImageView.layer.cornerRadius = 22; + _blueHeadImageView.layer.masksToBounds = YES; + _blueHeadImageView.layer.borderWidth = 1; + _blueHeadImageView.layer.borderColor = UIColorFromRGB(0x76c1F5).CGColor; + } + return _blueHeadImageView; +} + +- (UILabel *)blueRoomTitleLabel { + if (!_blueRoomTitleLabel) { + _blueRoomTitleLabel = [[UILabel alloc] init]; + _blueRoomTitleLabel.textColor = [UIColor whiteColor]; + _blueRoomTitleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium]; + _blueRoomTitleLabel.textAlignment = NSTextAlignmentCenter; + } + return _blueRoomTitleLabel; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.textColor = [UIColor whiteColor]; + _titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium]; + _titleLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; + } + return _titleLabel; +} + + +@end diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.h b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.h new file mode 100644 index 00000000..03fe5f93 --- /dev/null +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.h @@ -0,0 +1,16 @@ +// +// XPAcrossRoomPKResultView.h +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class AcrossRoomPKPanelModel; +@interface XPAcrossRoomPKResultView : UIView +@property (nonatomic, strong) AcrossRoomPKPanelModel *data; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.m b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.m new file mode 100644 index 00000000..2019c9d2 --- /dev/null +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKResultView.m @@ -0,0 +1,512 @@ +// +// XPAcrossRoomPKResultView.m +// xplan-ios +// +// Created by 冯硕 on 2022/1/12. +// + +#import "XPAcrossRoomPKResultView.h" +///Third +#import +///Tool +#import "ThemeColor.h" +#import "NetImageView.h" +#import "TTPopup.h" +///Model +#import "AcrossRoomPKPanelModel.h" + +@interface XPAcrossRoomPKResultView() +/** bgImageView */ +@property (nonatomic, strong) UIImageView *bgImageView; +///关闭 +@property (nonatomic, strong) UIButton *closeBtn; +///内容view +@property (nonatomic, strong) UIView *mainView; +///红队背景 +@property (nonatomic, strong) UIImageView *redBgImageView; +///红队赢icon +@property (nonatomic, strong) UIImageView *redWinIconView; +///红队头像 +@property (nonatomic, strong) NetImageView *redHeadImageView; +///红队厅名 +@property (nonatomic, strong) UILabel *redRoomTitleLabel; +///红队礼物值 +@property (nonatomic, strong) UILabel *redValueLabel; +///中间PKicon +@property (nonatomic, strong) UIImageView *middleImageView; +///蓝队背景 +@property (nonatomic, strong) UIImageView *blueBgImageView; +///蓝队赢icon +@property (nonatomic, strong) UIImageView *blueWinIconView; +///蓝队头像 +@property (nonatomic, strong) NetImageView *blueHeadImageView; +///蓝队厅名 +@property (nonatomic, strong) UILabel *blueRoomTitleLabel; +///蓝队礼物值 +@property (nonatomic, strong) UILabel *blueValueLabel; +///贡献榜背景 +@property (nonatomic, strong) UIImageView *contributeBgImageView; +///贡献榜头像 +@property (nonatomic, strong) NetImageView *contributeAvatar; +///贡献榜头饰 +@property (nonatomic, strong) UIImageView *contributeHeadWear; +///贡献榜昵称 +@property (nonatomic, strong) UILabel *contributeNick; +///贡献值 +@property (nonatomic, strong) UILabel *contributeValue; +///魅力榜背景 +@property (nonatomic, strong) UIImageView *charmBgImageView; +///魅力榜头像 +@property (nonatomic, strong) NetImageView *charmAvatar; +///魅力榜头饰 +@property (nonatomic, strong) UIImageView *charmHeadWear; +///魅力榜昵称 +@property (nonatomic, strong) UILabel *charmNick; +///魅力值 +@property (nonatomic, strong) UILabel *charmValue; + +@end + +@implementation XPAcrossRoomPKResultView + +#pragma mark - life cycle + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self initView]; + [self initConstrations]; + } + return self; +} + +- (void)initView { + [self addSubview:self.bgImageView]; + [self addSubview:self.closeBtn]; + [self addSubview:self.mainView]; + + [self.mainView addSubview:self.redBgImageView]; + [self.mainView addSubview:self.redWinIconView]; + [self.mainView addSubview:self.redHeadImageView]; + [self.mainView addSubview:self.redRoomTitleLabel]; + [self.mainView addSubview:self.redValueLabel]; + + [self.mainView addSubview:self.blueBgImageView]; + [self.mainView addSubview:self.blueWinIconView]; + [self.mainView addSubview:self.blueHeadImageView]; + [self.mainView addSubview:self.blueRoomTitleLabel]; + [self.mainView addSubview:self.blueValueLabel]; + + [self.mainView addSubview:self.middleImageView]; + + [self.mainView addSubview:self.contributeBgImageView]; + [self.mainView addSubview:self.contributeAvatar]; + [self.mainView addSubview:self.contributeHeadWear]; + [self.mainView addSubview:self.contributeNick]; + [self.mainView addSubview:self.contributeValue]; + + [self.mainView addSubview:self.charmBgImageView]; + [self.mainView addSubview:self.charmAvatar]; + [self.mainView addSubview:self.charmHeadWear]; + [self.mainView addSubview:self.charmNick]; + [self.mainView addSubview:self.charmValue]; +} + +- (void)initConstrations { + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(0); + }]; + [self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.right.mas_equalTo(0); + make.width.height.mas_equalTo(22); + }]; + [self.mainView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(120); + make.left.mas_equalTo(15); + make.right.mas_equalTo(-15); + make.bottom.mas_equalTo(-23); + }]; + [self.redBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(12); + make.left.mas_equalTo(6); + make.width.mas_equalTo(151); + make.height.mas_equalTo(135); + }]; + [self.redWinIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(_redBgImageView); + make.left.mas_equalTo(18); + make.width.mas_equalTo(49); + make.height.mas_equalTo(27); + }]; + [self.redHeadImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(34); + make.left.mas_equalTo(47); + make.width.height.mas_equalTo(60); + }]; + [self.redRoomTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.redHeadImageView.mas_bottom).mas_offset(8); + make.centerX.mas_equalTo(self.redHeadImageView); + make.height.mas_equalTo(12); + make.left.mas_equalTo(self.redBgImageView.mas_left).mas_offset(20); + }]; + [self.redValueLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.redHeadImageView); + make.top.mas_equalTo(self.redRoomTitleLabel.mas_bottom).offset(8); + make.left.mas_equalTo(self.redBgImageView.mas_left).mas_offset(20); + }]; + [self.middleImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(60); + make.centerX.mas_equalTo(self.mainView); + make.width.mas_equalTo(70); + make.height.mas_equalTo(49); + }]; + [self.blueBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(18); + make.right.mas_equalTo(-6); + make.width.mas_equalTo(151); + make.height.mas_equalTo(135); + }]; + [self.blueWinIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.blueBgImageView); + make.right.mas_equalTo(-16); + make.width.mas_equalTo(49); + make.height.mas_equalTo(27); + }]; + [self.blueHeadImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(41); + make.right.mas_equalTo(-47); + make.width.height.mas_equalTo(60); + }]; + [self.blueRoomTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.blueHeadImageView.mas_bottom).mas_offset(8); + make.centerX.mas_equalTo(self.blueHeadImageView); + make.height.mas_equalTo(12); + make.left.mas_equalTo(self.blueBgImageView.mas_left).mas_offset(16); + }]; + [self.blueValueLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.blueHeadImageView); + make.top.mas_equalTo(self.blueRoomTitleLabel.mas_bottom).offset(8); + make.left.mas_equalTo(self.blueBgImageView.mas_left).mas_offset(16); + }]; + [self.contributeBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(0); + make.top.mas_equalTo(self.blueBgImageView.mas_bottom).mas_offset(10); + make.height.mas_equalTo(64); + }]; + [self.contributeAvatar mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(70); + make.bottom.mas_equalTo(self.contributeBgImageView.mas_bottom).mas_offset(-6); + make.width.height.mas_equalTo(44); + }]; + [self.contributeHeadWear mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.contributeAvatar); + make.bottom.mas_equalTo(self.contributeAvatar); + make.width.mas_equalTo(44); + make.height.mas_equalTo(53); + }]; + [self.contributeNick mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.contributeHeadWear.mas_right).mas_offset(7); + make.bottom.mas_equalTo(self.contributeAvatar.mas_centerY).mas_offset(-3); + make.height.mas_equalTo(14); + make.right.mas_equalTo(-20); + }]; + [self.contributeValue mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.contributeNick); + make.top.mas_equalTo(self.contributeNick.mas_bottom).mas_offset(6); + make.height.mas_equalTo(13); + make.right.mas_equalTo(-20); + }]; + + [self.charmBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(0); + make.top.mas_equalTo(self.contributeBgImageView.mas_bottom).mas_offset(6); + make.height.mas_equalTo(64); + }]; + [self.charmAvatar mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(70); + make.bottom.mas_equalTo(self.charmBgImageView.mas_bottom).mas_offset(-6); + make.width.height.mas_equalTo(44); + }]; + [self.charmHeadWear mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.charmAvatar); + make.bottom.mas_equalTo(self.charmAvatar); + make.width.mas_equalTo(44); + make.height.mas_equalTo(53); + }]; + [self.charmNick mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.charmHeadWear.mas_right).mas_offset(7); + make.bottom.mas_equalTo(self.charmAvatar.mas_centerY).mas_offset(-3); + make.height.mas_equalTo(14); + make.right.mas_equalTo(-20); + }]; + [self.charmValue mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.charmNick); + make.top.mas_equalTo(self.charmNick.mas_bottom).mas_offset(6); + make.height.mas_equalTo(13); + make.right.mas_equalTo(-20); + }]; +} + + +- (void)setData:(AcrossRoomPKPanelModel *)data { + if (data.winUid == data.cUid) {//赢 + self.bgImageView.image = [UIImage imageNamed:@"room_across_pk_result_win_bg"]; + self.contributeBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_win_person_bg"]; + self.charmBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_win_person_bg"]; + [self.closeBtn setImage:[UIImage imageNamed:@"room_across_pk_result_win_close"] forState:UIControlStateNormal]; + self.redWinIconView.hidden = NO; + self.blueWinIconView.hidden = YES; + } else if (data.winUid == data.aUid) {//输 + self.bgImageView.image = [UIImage imageNamed:@"room_across_pk_result_fail_bg"]; + self.contributeBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_fail_person_bg"]; + self.charmBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_fail_person_bg"]; + [self.closeBtn setImage:[UIImage imageNamed:@"room_across_pk_result_fail_close"] forState:UIControlStateNormal]; + self.redWinIconView.hidden = YES; + self.blueWinIconView.hidden = NO; + } else {//平局 + self.bgImageView.image = [UIImage imageNamed:@"room_across_pk_result_tie_bg"]; + self.contributeBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_tie_person_bg"]; + self.charmBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_tie_person_bg"]; + [self.closeBtn setImage:[UIImage imageNamed:@"room_across_pk_result_tie_close"] forState:UIControlStateNormal]; + self.redWinIconView.hidden = YES; + self.blueWinIconView.hidden = YES; + } + self.redHeadImageView.imageUrl = data.cAvatar; + self.blueHeadImageView.imageUrl = data.aAvatar; + self.redRoomTitleLabel.text = data.cTitle; + self.blueRoomTitleLabel.text = data.aTitle; + self.redValueLabel.text = [NSString stringWithFormat:@"%lld", data.cAmount]; + self.blueValueLabel.text = [NSString stringWithFormat:@"%lld", data.aAmount]; + if (data.csRank.count > 0) {//有贡献 + AcrossRoomPkRankModel *contributeInfo = [data.csRank objectAtIndex:0]; + self.contributeNick.text = contributeInfo.nick ? contributeInfo.nick : @""; + self.contributeValue.text = [NSString stringWithFormat:@"神豪值:%@", contributeInfo.amount? contributeInfo.amount : @""]; + self.contributeAvatar.imageUrl = contributeInfo.avatar; + } + + if (data.crRank.count > 0) { + AcrossRoomPkRankModel *charmInfo = [data.crRank objectAtIndex:0]; + self.charmNick.text = charmInfo.nick ? charmInfo.nick : @""; + self.charmValue.text = [NSString stringWithFormat:@"魅力值:%@", charmInfo.amount? charmInfo.amount : @""]; + self.charmAvatar.imageUrl = charmInfo.avatar; + } +} + +- (void)onCloseBtnClick:(UIButton *)btn { + [TTPopup dismiss]; +} + +#pragma mark - getters and setters +- (UIImageView *)bgImageView { + if (!_bgImageView) { + _bgImageView = [[UIImageView alloc] init]; + _bgImageView.image = [UIImage imageNamed:@"room_across_pk_result_win_bg"]; + } + return _bgImageView; +} + +- (UIButton *)closeBtn { + if (!_closeBtn) { + _closeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_closeBtn addTarget:self action:@selector(onCloseBtnClick:) forControlEvents:UIControlEventTouchUpInside]; + } + return _closeBtn; +} + +- (UIView *)mainView { + if (!_mainView) { + _mainView = [[UIView alloc] init]; + } + return _mainView; +} +- (UIImageView *)redBgImageView { + if (!_redBgImageView) { + _redBgImageView = [[UIImageView alloc] init]; + _redBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_red_bg"]; + } + return _redBgImageView; +} +- (UIImageView *)redWinIconView { + if (!_redWinIconView) { + _redWinIconView = [[UIImageView alloc] init]; + _redWinIconView.image = [UIImage imageNamed:@"room_across_pk_result_win_icon"]; + } + return _redWinIconView; +} + +- (NetImageView *)redHeadImageView { + if (!_redHeadImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _redHeadImageView = [[NetImageView alloc] initWithConfig:config]; + _redHeadImageView.layer.cornerRadius = 30; + _redHeadImageView.layer.masksToBounds = YES; + _redHeadImageView.layer.borderWidth = 1; + _redHeadImageView.layer.borderColor = [UIColor whiteColor].CGColor; + } + return _redHeadImageView; +} + +- (UILabel *)redRoomTitleLabel { + if (!_redRoomTitleLabel) { + _redRoomTitleLabel = [[UILabel alloc] init]; + _redRoomTitleLabel.textColor = [UIColor whiteColor]; + _redRoomTitleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; + _redRoomTitleLabel.textAlignment = NSTextAlignmentCenter; + } + return _redRoomTitleLabel; +} +- (UILabel *)redValueLabel { + if (!_redValueLabel) { + _redValueLabel = [[UILabel alloc] init]; + _redValueLabel.textColor = [UIColor whiteColor]; + _redValueLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold]; + _redValueLabel.textAlignment = NSTextAlignmentCenter; + } + return _redValueLabel; +} + +- (UIImageView *)middleImageView { + if (!_middleImageView) { + _middleImageView = [[UIImageView alloc] init]; + _middleImageView.image = [UIImage imageNamed:@"room_across_pk_result_pk_icon"]; + } + return _middleImageView; +} + +- (UIImageView *)blueBgImageView { + if (!_blueBgImageView) { + _blueBgImageView = [[UIImageView alloc] init]; + _blueBgImageView.image = [UIImage imageNamed:@"room_across_pk_result_win_blue_bg"]; + } + return _blueBgImageView; +} +- (UIImageView *)blueWinIconView { + if (!_blueWinIconView) { + _blueWinIconView = [[UIImageView alloc] init]; + _blueWinIconView.image = [UIImage imageNamed:@"room_across_pk_result_win_icon"]; + } + return _blueWinIconView; +} + +- (NetImageView *)blueHeadImageView { + if (!_blueHeadImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _blueHeadImageView = [[NetImageView alloc] initWithConfig:config]; + _blueHeadImageView.layer.masksToBounds = YES; + _blueHeadImageView.layer.cornerRadius = 30; + _blueHeadImageView.layer.borderWidth = 1; + _blueHeadImageView.layer.borderColor = [UIColor whiteColor].CGColor; + } + return _blueHeadImageView; +} + +- (UILabel *)blueRoomTitleLabel { + if (!_blueRoomTitleLabel) { + _blueRoomTitleLabel = [[UILabel alloc] init]; + _blueRoomTitleLabel.textColor = [UIColor whiteColor]; + _blueRoomTitleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; + _blueRoomTitleLabel.textAlignment = NSTextAlignmentCenter; + } + return _blueRoomTitleLabel; +} +- (UILabel *)blueValueLabel { + if (!_blueValueLabel) { + _blueValueLabel = [[UILabel alloc] init]; + _blueValueLabel.textColor = [UIColor whiteColor]; + _blueValueLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold]; + _blueValueLabel.textAlignment = NSTextAlignmentCenter; + } + return _blueValueLabel; +} + +- (UIImageView *)contributeBgImageView { + if (!_contributeBgImageView) { + _contributeBgImageView = [[UIImageView alloc] init]; + } + return _contributeBgImageView; +} + +- (NetImageView *)contributeAvatar { + if (!_contributeAvatar) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _contributeAvatar = [[NetImageView alloc] initWithConfig:config]; + _contributeAvatar.layer.masksToBounds = YES; + _contributeAvatar.layer.cornerRadius = 22; + } + return _contributeAvatar; +} + +- (UIImageView *)contributeHeadWear { + if (!_contributeHeadWear) { + _contributeHeadWear = [[UIImageView alloc] init]; + _contributeHeadWear.image = [UIImage imageNamed:@"room_across_pk_panel_contribute_head"]; + } + return _contributeHeadWear; +} +- (UILabel *)contributeNick { + if (!_contributeNick) { + _contributeNick = [[UILabel alloc] init]; + _contributeNick.textColor = [UIColor whiteColor]; + _contributeNick.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium]; + } + return _contributeNick; +} + +- (UILabel *)contributeValue { + if (!_contributeValue) { + _contributeValue = [[UILabel alloc] init]; + _contributeValue.textColor = [UIColor whiteColor]; + _contributeValue.font = [UIFont systemFontOfSize:13]; + } + return _contributeValue; +} + +- (UIImageView *)charmBgImageView { + if (!_charmBgImageView) { + _charmBgImageView = [[UIImageView alloc] init]; + } + return _charmBgImageView; +} + +- (NetImageView *)charmAvatar { + if (!_charmAvatar) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _charmAvatar = [[NetImageView alloc] initWithConfig:config]; + _charmAvatar.layer.masksToBounds = YES; + _charmAvatar.layer.cornerRadius = 22; + } + return _charmAvatar; +} + +- (UIImageView *)charmHeadWear { + if (!_charmHeadWear) { + _charmHeadWear = [[UIImageView alloc] init]; + _charmHeadWear.image = [UIImage imageNamed:@"room_across_pk_panel_charm_head"]; + } + return _charmHeadWear; +} +- (UILabel *)charmNick { + if (!_charmNick) { + _charmNick = [[UILabel alloc] init]; + _charmNick.textColor = [UIColor whiteColor]; + _charmNick.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium]; + } + return _charmNick; +} + +- (UILabel *)charmValue { + if (!_charmValue) { + _charmValue = [[UILabel alloc] init]; + _charmValue.textColor = [UIColor whiteColor]; + _charmValue.font = [UIFont systemFontOfSize:13]; + } + return _charmValue; +} +@end diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrpssRoomPKPanelView.h b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrpssRoomPKPanelView.h index 022a2e7a..5143ea9a 100644 --- a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrpssRoomPKPanelView.h +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrpssRoomPKPanelView.h @@ -3,17 +3,31 @@ // xplan-ios // // Created by 冯硕 on 2022/1/11. -// +// 跨房PK 正在Pk的面板数据 #import NS_ASSUME_NONNULL_BEGIN -@class AcrossRoomPKPanelModel; +@class AcrossRoomPKPanelModel, XPAcrpssRoomPKPanelView; +@protocol XPAcrpssRoomPKPanelViewDelegate +///展示用户卡片 +- (void)xPAcrpssRoomPKPanelView:(XPAcrpssRoomPKPanelView *)view showUserCard:(NSString *)uid; +///送礼物 +- (void)xPAcrpssRoomPKPanelView:(XPAcrpssRoomPKPanelView *)view sendGiftToUser:(NSString *)uid; +///去房间 +- (void)xPAcrpssRoomPKPanelView:(XPAcrpssRoomPKPanelView *)view onlookRoom:(NSString *)roomUid; + +@end + @interface XPAcrpssRoomPKPanelView : UIView ///开启pk - (void)openCountdownWithTime:(long)time; ///pk 信息 -@property (nonatomic,strong) AcrossRoomPKPanelModel *pkPanelInfo; +@property (nonatomic,strong, nullable) AcrossRoomPKPanelModel *pkPanelInfo; +///代理 +@property (nonatomic,weak) id delegate; +///重置数据 +- (void)resetAcrossPKViewData; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrpssRoomPKPanelView.m b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrpssRoomPKPanelView.m index 5f8c868a..492e1b0e 100644 --- a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrpssRoomPKPanelView.m +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrpssRoomPKPanelView.m @@ -14,6 +14,8 @@ #import "NetImageView.h" #import "XPMacro.h" #import "UIImage+Utils.h" +#import "UIButton+EnlargeTouchArea.h" +#import "Timestamp.h" ///Model #import "UserInfoModel.h" #import "AcrossRoomPKPanelModel.h" @@ -50,6 +52,8 @@ /// 去围观 @property (nonatomic, strong) UIButton *onlookButton; #pragma mark -进度条内容 +///PK最外面的容器 +@property (nonatomic, strong) UIView *progressView; ///PK条容器 @property (nonatomic, strong) UIView *progressContentView; ///红方的进度图片 @@ -100,7 +104,6 @@ - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { - self.userInteractionEnabled = YES; UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(changeLocation:)]; // 这里的delaysTouchesBegan属性很明显就是对touchBegin方法是否进行延迟, // YES表示延迟,即在系统未识别出来手势为什么手势时先不要调用touchesBegan 方法; @@ -114,6 +117,15 @@ return self; } +#pragma mark - Public Method +- (void)resetAcrossPKViewData { + if (self.timer) { + dispatch_source_cancel(self.timer); + self.timer = nil; + } + self.pkPanelInfo = nil; +} + #pragma mark - Private Method - (void)initSubViews { [self addSubview:self.backImageView]; @@ -135,13 +147,14 @@ [self.teamContainerView addSubview:self.blueTitleLabel]; [self.teamContainerView addSubview:self.blueAvatarImageView]; [self.teamContainerView addSubview:self.onlookButton]; - [self.teamContainerView addSubview:self.progressContentView]; + [self.teamContainerView addSubview:self.progressView]; ///进度条 + [self.progressView addSubview:self.progressContentView]; + [self.progressView addSubview:self.svgDisplayView]; [self.progressContentView addSubview:self.redCountImageView]; [self.progressContentView addSubview:self.buleCountImageView]; [self.progressContentView addSubview:self.redCountLabel]; [self.progressContentView addSubview:self.buleCountLabel]; - [self.progressContentView addSubview:self.svgDisplayView]; ///PK双方的用户的View [self.userStackView addArrangedSubview:self.contributeStackView]; [self.userStackView addArrangedSubview:self.charmStackView]; @@ -169,6 +182,8 @@ XPAcrossRoomPKPanelUserView * userView = [[XPAcrossRoomPKPanelUserView alloc] init]; userView.tag = (1000 + i); userView.type = AcrossRoomPKPanelUserType_Red_Contribute; + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapUserRecognizer:)]; + [userView addGestureRecognizer:tap]; [self.redContributeStackView addArrangedSubview:userView]; } @@ -176,6 +191,8 @@ XPAcrossRoomPKPanelUserView * userView = [[XPAcrossRoomPKPanelUserView alloc] init]; userView.tag = (1000 + i); userView.type = AcrossRoomPKPanelUserType_Blue_Contribute; + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapUserRecognizer:)]; + [userView addGestureRecognizer:tap]; [self.blueContributeStackView addArrangedSubview:userView]; } @@ -183,6 +200,8 @@ XPAcrossRoomPKPanelUserView * userView = [[XPAcrossRoomPKPanelUserView alloc] init]; userView.tag = (1000 + i); userView.type = AcrossRoomPKPanelUserType_Red_Charm; + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapUserRecognizer:)]; + [userView addGestureRecognizer:tap]; [self.redCharmStackView addArrangedSubview:userView]; } @@ -190,6 +209,8 @@ XPAcrossRoomPKPanelUserView * userView = [[XPAcrossRoomPKPanelUserView alloc] init]; userView.tag = (1000 + i); userView.type = AcrossRoomPKPanelUserType_Blue_Charm; + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapUserRecognizer:)]; + [userView addGestureRecognizer:tap]; [self.blueCharmStackView addArrangedSubview:userView]; } } @@ -197,7 +218,7 @@ - (void)initSubViewConstraints { [self mas_makeConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(339); - make.bottom.mas_equalTo(self.backImageView); + make.height.mas_equalTo(233); }]; [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { @@ -211,7 +232,7 @@ }]; [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.mas_equalTo(self.helpButton); - make.centerX.mas_equalTo(self.helpButton.mas_right).mas_offset(66); + make.centerX.mas_equalTo(self.helpButton.mas_right).offset(66); }]; [self.ruleBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { @@ -240,8 +261,7 @@ [self.foldButton mas_makeConstraints:^(MASConstraintMaker *make) { make.size.mas_equalTo(CGSizeMake(16, 8)); }]; - - ///队伍信息的 + [self.userStackView mas_makeConstraints:^(MASConstraintMaker *make) { make.height.mas_equalTo(38 * 2 + 8); make.left.right.mas_equalTo(self.stackView).inset(12); @@ -255,12 +275,12 @@ [self.redAvatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.teamContainerView).offset(30); - make.top.mas_equalTo(self.redTitleLabel.mas_bottom).mas_offset(11); + make.top.mas_equalTo(self.redTitleLabel.mas_bottom).offset(11); make.width.height.mas_equalTo(44); }]; [self.assistButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.redAvatarImageView.mas_right).mas_offset(8); + make.left.mas_equalTo(self.redAvatarImageView.mas_right).offset(8); make.top.mas_equalTo(self.redAvatarImageView); make.width.mas_equalTo(50); make.height.mas_equalTo(18); @@ -273,57 +293,59 @@ }]; [self.blueAvatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_equalTo(-30); + make.right.mas_equalTo(self.teamContainerView).offset(-30); make.centerY.mas_equalTo(self.redAvatarImageView); make.width.height.mas_equalTo(44); }]; [self.onlookButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_equalTo(self.blueAvatarImageView.mas_left).mas_offset(-8); + make.right.mas_equalTo(self.blueAvatarImageView.mas_left).offset(-8); make.centerY.mas_equalTo(self.assistButton); make.width.mas_equalTo(50); make.height.mas_equalTo(18); }]; ///进度条 - [self.progressContentView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.assistButton); - make.right.mas_equalTo(self.onlookButton); + [self.progressView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.teamContainerView); + make.width.mas_equalTo(174); make.height.mas_equalTo(12); make.top.mas_equalTo(self.assistButton.mas_bottom).offset(8); }]; + [self.progressContentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.progressView); + }]; + [self.redCountImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(0); make.height.mas_equalTo(12); - make.centerY.mas_equalTo(0); + make.top.mas_equalTo(0); make.right.mas_equalTo(self.buleCountImageView.mas_left); }]; [self.redCountLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.redCountImageView.mas_left).mas_offset(6); - make.right.mas_lessThanOrEqualTo(self.redCountImageView); - make.centerY.mas_equalTo(self.redCountImageView); + make.left.mas_equalTo(self.progressContentView.mas_left).offset(6); + make.centerY.mas_equalTo(self.progressContentView); }]; [self.svgDisplayView mas_makeConstraints:^(MASConstraintMaker *make) { - make.centerX.mas_equalTo(self.redCountImageView); - make.bottom.mas_equalTo(self.progressContentView.mas_bottom).mas_offset(-5); + make.centerX.mas_equalTo(self.buleCountImageView.mas_left); + make.bottom.mas_equalTo(self.progressView.mas_bottom); make.height.mas_equalTo(27); make.width.mas_equalTo(18); }]; [self.buleCountImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_equalTo(self.progressContentView).offset(-6); + make.right.mas_equalTo(0); make.height.mas_equalTo(12); - make.centerY.mas_equalTo(self.progressContentView); - make.width.mas_equalTo(self.progressContentView.mas_width).multipliedBy(0.5); + make.centerY.mas_equalTo(self.redCountImageView); + make.width.mas_equalTo(174 * 0.5); }]; [self.buleCountLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_equalTo(self.buleCountImageView.mas_right).mas_offset((-6)); - make.left.mas_lessThanOrEqualTo(self.buleCountImageView); - make.centerY.mas_equalTo(self.buleCountImageView); + make.right.mas_equalTo(self.progressContentView.mas_right).offset(-6); + make.centerY.mas_equalTo(self.progressContentView); }]; [self.contributeStackView mas_makeConstraints:^(MASConstraintMaker *make) { @@ -353,31 +375,30 @@ #pragma mark - 倒计时 - (void)openCountdownWithTime:(long)time { __block long tempTime = time; //倒计时时间 - if (self.timer != nil) { - dispatch_source_cancel(self.timer); + if (self.timer == nil) { + @kWeakify(self); + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + self.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue); + dispatch_source_set_timer(self.timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行 + dispatch_source_set_event_handler(self.timer, ^{ + @kStrongify(self); + if(tempTime <= 0){ //倒计时结束,关闭 + dispatch_source_cancel(self.timer); + self.timer = nil; + dispatch_async(dispatch_get_main_queue(), ^{ + self.timeLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold]; + self.timeLabel.text = @"PK结果计算中"; + }); + } else { + dispatch_async(dispatch_get_main_queue(), ^{ + //设置按钮显示读秒效果 + [self acrossRoomPKCutdownOpen:tempTime]; + }); + tempTime--; + } + }); + dispatch_resume(self.timer); } - @kWeakify(self); - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - self.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue); - dispatch_source_set_timer(self.timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行 - dispatch_source_set_event_handler(self.timer, ^{ - @kStrongify(self); - if(tempTime <= 0){ //倒计时结束,关闭 - dispatch_source_cancel(self.timer); - self.timer = nil; - dispatch_async(dispatch_get_main_queue(), ^{ - self.timeLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold]; - self.timeLabel.text = @"PK结果计算中"; - }); - } else { - dispatch_async(dispatch_get_main_queue(), ^{ - //设置按钮显示读秒效果 - [self acrossRoomPKCutdownOpen:tempTime]; - }); - tempTime--; - } - }); - dispatch_resume(self.timer); } ///房间pk, 倒计时回调 @@ -405,11 +426,19 @@ sender.selected = !sender.selected; if (sender.isSelected) { self.userStackView.hidden = NO; + [self mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(233); + }]; + self.backImageView.image = [UIImage imageNamed:@"room_across_pk_panel_bg"]; [UIView animateWithDuration:0.5 animations:^{ self.foldButton.transform = CGAffineTransformIdentity; }]; } else { self.userStackView.hidden = YES; + self.backImageView.image = [UIImage imageNamed:@"room_across_pk_panel_small_bg"]; + [self mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(137); + }]; [UIView animateWithDuration:0.5 animations:^{ self.foldButton.transform = CGAffineTransformMakeRotation(M_PI); }]; @@ -422,19 +451,34 @@ } - (void)tapRedAvatarRecognizer:(UITapGestureRecognizer *)ges { -//TODO: 点击了红色头像 + if (self.delegate && [self.delegate respondsToSelector:@selector(xPAcrpssRoomPKPanelView:showUserCard:)]) { + [self.delegate xPAcrpssRoomPKPanelView:self showUserCard:self.pkPanelInfo.cUid]; + } } - (void)tapBlueAvatarRecognizer:(UITapGestureRecognizer *)ges { -//TODO: 点击了蓝色头像 + if (self.delegate && [self.delegate respondsToSelector:@selector(xPAcrpssRoomPKPanelView:showUserCard:)]) { + [self.delegate xPAcrpssRoomPKPanelView:self showUserCard:self.pkPanelInfo.aUid]; + } } - (void)assistButtonAction:(UIButton *)sender { - //TODO: 助攻 + if (self.delegate && [self.delegate respondsToSelector:@selector(xPAcrpssRoomPKPanelView:sendGiftToUser:)]) { + [self.delegate xPAcrpssRoomPKPanelView:self sendGiftToUser:self.pkPanelInfo.cUid]; + } } - (void)onlookButtonAction:(UIButton *)sender { - //TODO: 点击去围观 + if (self.delegate && [self.delegate respondsToSelector:@selector(xPAcrpssRoomPKPanelView:onlookRoom:)]) { + [self.delegate xPAcrpssRoomPKPanelView:self onlookRoom:self.pkPanelInfo.aUid]; + } +} + +- (void)tapUserRecognizer:(UITapGestureRecognizer *)tap { + XPAcrossRoomPKPanelUserView * userView= (XPAcrossRoomPKPanelUserView *)tap.view; + if (userView.panelInfo && userView.panelInfo.uid.length > 0 && self.delegate && [self.delegate respondsToSelector:@selector(xPAcrpssRoomPKPanelView:showUserCard:)]) { + [self.delegate xPAcrpssRoomPKPanelView:self showUserCard:userView.panelInfo.uid]; + } } - (void)changeLocation:(UIPanGestureRecognizer*)p { @@ -482,14 +526,10 @@ newCenter = CGPointMake(panPoint.x, screenHeight - touchWidth / 3); } [UIView animateWithDuration:0.25 animations:^{ - if (newCenter.y + self.frame.size.height / 2 > KScreenHeight - kSafeAreaBottomHeight - 44) { - [self mas_updateConstraints:^(MASConstraintMaker *make) { - make.center.mas_equalTo(CGPointMake(newCenter.x, KScreenHeight - self.frame.size.height / 2 - kSafeAreaBottomHeight - 44)); - }]; + if ((newCenter.y + self.frame.size.height / 2) > (KScreenHeight - kSafeAreaBottomHeight - 44)) { + self.center = CGPointMake(newCenter.x, KScreenHeight - self.frame.size.height / 2 - kSafeAreaBottomHeight - 44); }else { - [self mas_updateConstraints:^(MASConstraintMaker *make) { - make.center.mas_equalTo(newCenter); - }]; + self.center = newCenter; } }]; } @@ -499,6 +539,17 @@ - (void)setPkPanelInfo:(AcrossRoomPKPanelModel *)pkPanelInfo { _pkPanelInfo = pkPanelInfo; if (_pkPanelInfo) { + [Timestamp getInternetDateWithSuccess:^(NSTimeInterval timeInterval) { + timeInterval = timeInterval * 1000; + long aTime = (pkPanelInfo.endTime - timeInterval) / 1000; + [self openCountdownWithTime:aTime]; + } failure:^(NSError * _Nonnull error) { + NSDate *datenow = [NSDate date];//现在时间 + long time2 = (long)([datenow timeIntervalSince1970]*1000); + long aTime = (pkPanelInfo.endTime - time2) / 1000; + [self openCountdownWithTime:aTime]; + }]; + self.redTitleLabel.text = _pkPanelInfo.cTitle; self.redAvatarImageView.imageUrl = _pkPanelInfo.cAvatar; self.redCountLabel.text = [NSString stringWithFormat:@"%lld", _pkPanelInfo.cAmount]; @@ -507,7 +558,7 @@ self.buleCountLabel.text = [NSString stringWithFormat:@"%lld", _pkPanelInfo.aAmount]; for (int i = 0; i<_pkPanelInfo.csRank.count; i++) { AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.csRank objectAtIndex:i]; - if (i < self.redContributeStackView.subviews.count) { + if (i >= self.redContributeStackView.subviews.count) { break; } XPAcrossRoomPKPanelUserView *userView = self.redContributeStackView.subviews[i]; @@ -515,7 +566,7 @@ } for (int i = 0; i<_pkPanelInfo.crRank.count; i++) { AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.crRank objectAtIndex:i]; - if (i < self.redCharmStackView.subviews.count) { + if (i >= self.redCharmStackView.subviews.count) { break; } XPAcrossRoomPKPanelUserView *userView = self.redCharmStackView.subviews[i]; @@ -524,7 +575,7 @@ for (int i = 0; i<_pkPanelInfo.asRank.count; i++) { AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.asRank objectAtIndex:i]; - if (i < self.blueContributeStackView.subviews.count) { + if (i >= self.blueContributeStackView.subviews.count) { break; } XPAcrossRoomPKPanelUserView *userView = self.blueContributeStackView.subviews[i]; @@ -533,7 +584,7 @@ for (int i = 0; i<_pkPanelInfo.arRank.count; i++) { AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.arRank objectAtIndex:i]; - if (i < self.blueCharmStackView.subviews.count) { + if (i >= self.blueCharmStackView.subviews.count) { break; } XPAcrossRoomPKPanelUserView *userView = self.blueCharmStackView.subviews[i]; @@ -543,8 +594,38 @@ if (_pkPanelInfo.aPercent > 1) { _pkPanelInfo.aPercent = 1; } + CGFloat width = 174; [self.buleCountImageView mas_updateConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(self.progressContentView.mas_width).multipliedBy(_pkPanelInfo.aPercent); + make.width.mas_equalTo(width * _pkPanelInfo.aPercent); + }]; + } else { + self.redTitleLabel.text = @""; + self.redAvatarImageView.image = nil; + self.redCountLabel.text = @"0"; + self.blueTitleLabel.text = @""; + self.blueAvatarImageView.image = nil; + self.buleCountLabel.text = @"0"; + for (int i = 0; i ///展示的不同层级 @@ -98,6 +101,8 @@ #pragma mark - 相亲动画的 @property (nonatomic, strong) NSMutableArray *datingEffectQueue; @property (nonatomic,strong) SVGAImageView *datingEffectView; +#pragma mark - 跨房PK +@property (nonatomic, strong) NSMutableArray *acrossRoomPKQueue; @end @implementation XPRoomAnimationView @@ -177,6 +182,8 @@ [self receiveDriveCarEnterRoom:attachment]; } else if(attachment.first == CustomMessageType_RoomPlay_Dating && attachment.second == Custom_Message_Sub_Room_Play_Dating_Public_Result) { [self roomDatingPublicResult:attachment]; + } else if(attachment.first == CustomMessageType_Across_Room_PK && attachment.second == Custom_Message_Sub_AcrossRoomPK_Result) { + [self acrossRoomPKBannerAnimation:attachment]; } } } @@ -191,6 +198,46 @@ [self userEnterRoom:content ext:extModel]; } } +#pragma mark - 跨房PK横幅动画 +- (void)acrossRoomPKBannerAnimation:(AttachmentModel *)attacment { + AcrossRoomPKPrizeModel * prizeModel = [AcrossRoomPKPrizeModel modelWithJSON:attacment.data]; + [self.acrossRoomPKQueue addObject:prizeModel]; + if (self.acrossRoomPKQueue.count > 0) { + [self startAcrossRoomPKAnimation:self.acrossRoomPKQueue.firstObject]; + } +} + +- (void)startAcrossRoomPKAnimation:(AcrossRoomPKPrizeModel *)model { + XPAcrossRoomPKPrizeView *wishEffectView = [[XPAcrossRoomPKPrizeView alloc] initWithFrame:CGRectMake(KScreenWidth, kNavigationHeight+10, KScreenWidth, 87)]; + wishEffectView.data = model; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gotoPkWinRoom:)]; + [wishEffectView addGestureRecognizer:tap]; + [self.middleLevelView addSubview:wishEffectView]; + [UIView animateWithDuration:0.5 animations:^{ + wishEffectView.frame = CGRectMake(0, kNavigationHeight+10, KScreenWidth, 87); + } completion:^(BOOL finished) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [UIView animateWithDuration:0.5 animations:^{ + wishEffectView.hidden = YES; + } completion:^(BOOL finished) { + [wishEffectView removeFromSuperview]; + [self.acrossRoomPKQueue removeObject:model]; + if (self.acrossRoomPKQueue.count > 0) { + [self startAcrossRoomPKAnimation:self.acrossRoomPKQueue.firstObject]; + } + }]; + }); + }]; +} + +- (void)gotoPkWinRoom:(UITapGestureRecognizer *)tap { + XPAcrossRoomPKPrizeView *wishEffectView = (XPAcrossRoomPKPrizeView *)tap.view; + if (wishEffectView.data.winUid.integerValue > 0) { + [self.delegate exitRoom]; + [XPRoomViewController openRoom:wishEffectView.data.winUid viewController:self.delegate.getCurrentNav]; + } +} + #pragma mark - 相亲 动画 - (void)roomDatingPublicResult:(AttachmentModel *)attachment { self.datingEffectQueue = [NSMutableArray array]; @@ -1299,5 +1346,12 @@ } +- (NSMutableArray *)acrossRoomPKQueue { + if (!_acrossRoomPKQueue) { + _acrossRoomPKQueue = [NSMutableArray array]; + } + return _acrossRoomPKQueue; +} + @end diff --git a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m index 5410fcdf..94b32fa5 100644 --- a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m +++ b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m @@ -38,7 +38,12 @@ #import "XPAcrossRoomPKInviteView.h" #import "XPAcrossRoomPKInviteResultView.h" #import "XPAcrpssRoomPKPanelView.h" -@interface XPRoomFunctionContainerView () +#import "XPAcrossRoomPKResultView.h" +#import "XPAcrossRoomPKForceEndResultView.h" +#import "XPSendGiftView.h" +#import "XPUserCardViewController.h" +#import "XPRoomViewController.h" +@interface XPRoomFunctionContainerView () ///host 代理 @property (nonatomic,weak) iddelegate; ///房间榜 @@ -302,7 +307,18 @@ break; case Custom_Message_Sub_AcrossRoomPK_End: { - + [self.acrossPKPanelView resetAcrossPKViewData]; + [self.acrossPKPanelView removeFromSuperview]; + AcrossRoomPKPanelModel * model = [AcrossRoomPKPanelModel modelWithJSON:attachment.data]; + if (model.isForce) { + XPAcrossRoomPKForceEndResultView *view = [[XPAcrossRoomPKForceEndResultView alloc] initWithFrame:CGRectMake(0, 0, 281, 208)]; + view.data = model; + [TTPopup popupView:view style:TTPopupStyleAlert]; + } else { + XPAcrossRoomPKResultView *view = [[XPAcrossRoomPKResultView alloc] initWithFrame:CGRectMake(0, 0, 320, 453)]; + view.data = model; + [TTPopup popupView:view style:TTPopupStyleAlert]; + } } default: break; @@ -340,6 +356,67 @@ } } + +#pragma mark - XPAcrpssRoomPKPanelViewDelegate +- (void)xPAcrpssRoomPKPanelView:(XPAcrpssRoomPKPanelView *)view onlookRoom:(NSString *)roomUid { + [self.delegate exitRoom]; + [XPRoomViewController openRoom:roomUid viewController:self.delegate.getCurrentNav]; +} + +- (void)xPAcrpssRoomPKPanelView:(XPAcrpssRoomPKPanelView *)view sendGiftToUser:(NSString *)uid { + NSString * roomUid = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].uid]; + XPSendGiftView * giftView = [[XPSendGiftView alloc] initWithType:SendGiftType_Room uid:roomUid]; + giftView.delegate = self.delegate; + NSArray * giftUses = [self configGiftUsers:[self.delegate getMicroQueue]]; + [giftView configGiftUsers:giftUses]; + [TTPopup popupView:giftView style:TTPopupStyleActionSheet]; +} + +- (NSArray *)configGiftUsers:(NSMutableDictionary *)queue { + NSMutableArray * array = [NSMutableArray array]; + for (MicroQueueModel * microModel in queue.allValues) { + if (microModel.userInfo && microModel.userInfo.uid >0) { + UserInfoModel * userInfo = microModel.userInfo; + XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init]; + userModel.avatar = userInfo.avatar; + userModel.position = [NSString stringWithFormat:@"%d", microModel.microState.position]; + userModel.uid = userInfo.uid; + [array addObject:userModel]; + } + } + + if (self.delegate.getRoomInfo.leaveMode) { + RoomInfoModel * roomInfo= self.delegate.getRoomInfo; + XPGiftUserInfoModel * userModel = [[XPGiftUserInfoModel alloc] init]; + userModel.avatar = roomInfo.avatar; + userModel.position = @"-1"; + userModel.uid = roomInfo.uid; + [array addObject:userModel]; + } + return array; +} + +- (void)xPAcrpssRoomPKPanelView:(XPAcrpssRoomPKPanelView *)view showUserCard:(NSString *)uid { + RoomInfoModel * roomInfo = self.delegate.getRoomInfo; + NSString * targetUid = uid; + XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init]; + [[self.delegate.getMicroQueue allValues] enumerateObjectsUsingBlock:^(MicroQueueModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if (targetUid.integerValue == obj.userInfo.uid) { + model.position = [NSString stringWithFormat:@"%d", obj.microState.position]; + model.posState = obj.microState.posState; + model.micState = obj.microState.micState; + *stop = YES; + } + }]; + model.nick = self.delegate.getUserInfo.nick; + model.uid = targetUid; + model.delegate = self.delegate; + model.roomInfo = roomInfo; + model.micQueue = self.delegate.getMicroQueue; + XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model]; + [self.delegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil]; +} + #pragma mark - Event Response - (void)contributionButtonAction:(UIButton *)sender { NSString * roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid]; @@ -608,6 +685,7 @@ - (XPAcrpssRoomPKPanelView *)acrossPKPanelView { if (!_acrossPKPanelView) { _acrossPKPanelView = [[XPAcrpssRoomPKPanelView alloc] init]; + _acrossPKPanelView.delegate = self; } return _acrossPKPanelView; }