房间内PK创建的UI
@@ -286,6 +286,14 @@
|
||||
E800807F27FD859E0055A8AB /* ClanDetailInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E800807E27FD859E0055A8AB /* ClanDetailInfoModel.m */; };
|
||||
E800808527FD8FC20055A8AB /* ClanMemberDetailInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E800808427FD8FC20055A8AB /* ClanMemberDetailInfoModel.m */; };
|
||||
E800808827FDA5100055A8AB /* XPClanSectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = E800808727FDA5100055A8AB /* XPClanSectionView.m */; };
|
||||
E801274027E323C800BAC3F2 /* XPRoomPKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E801273F27E323C800BAC3F2 /* XPRoomPKViewController.m */; };
|
||||
E801274327E323E500BAC3F2 /* XPRoomPKPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E801274227E323E500BAC3F2 /* XPRoomPKPresenter.m */; };
|
||||
E801274727E3241700BAC3F2 /* Api+RoomPK.m in Sources */ = {isa = PBXBuildFile; fileRef = E801274627E3241700BAC3F2 /* Api+RoomPK.m */; };
|
||||
E801274B27E327DA00BAC3F2 /* XPRoomPKTypeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E801274A27E327DA00BAC3F2 /* XPRoomPKTypeTableViewCell.m */; };
|
||||
E801274E27E3280000BAC3F2 /* XPRoomPKVoteTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E801274D27E3280000BAC3F2 /* XPRoomPKVoteTableViewCell.m */; };
|
||||
E801275127E3281100BAC3F2 /* XPRoomPKTimeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E801275027E3281100BAC3F2 /* XPRoomPKTimeTableViewCell.m */; };
|
||||
E801275527E3326000BAC3F2 /* XPRoomPKUserView.m in Sources */ = {isa = PBXBuildFile; fileRef = E801275427E3326000BAC3F2 /* XPRoomPKUserView.m */; };
|
||||
E801275827E347FD00BAC3F2 /* RoomPKRecordModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E801275727E347FD00BAC3F2 /* RoomPKRecordModel.m */; };
|
||||
E80487652717DDD9008595F2 /* XPRoomMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = E80487642717DDD9008595F2 /* XPRoomMenuItem.m */; };
|
||||
E8098CB4282E97550090B9F0 /* XPMineBlackListPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8098CB3282E97550090B9F0 /* XPMineBlackListPresenter.m */; };
|
||||
E80B0712280D0A6700A79F63 /* FansInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E80B0711280D0A6700A79F63 /* FansInfoModel.m */; };
|
||||
@@ -1363,6 +1371,23 @@
|
||||
E800808427FD8FC20055A8AB /* ClanMemberDetailInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ClanMemberDetailInfoModel.m; sourceTree = "<group>"; };
|
||||
E800808627FDA5100055A8AB /* XPClanSectionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPClanSectionView.h; sourceTree = "<group>"; };
|
||||
E800808727FDA5100055A8AB /* XPClanSectionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPClanSectionView.m; sourceTree = "<group>"; };
|
||||
E801273E27E323C800BAC3F2 /* XPRoomPKViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKViewController.h; sourceTree = "<group>"; };
|
||||
E801273F27E323C800BAC3F2 /* XPRoomPKViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKViewController.m; sourceTree = "<group>"; };
|
||||
E801274127E323E500BAC3F2 /* XPRoomPKPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKPresenter.h; sourceTree = "<group>"; };
|
||||
E801274227E323E500BAC3F2 /* XPRoomPKPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKPresenter.m; sourceTree = "<group>"; };
|
||||
E801274427E3240000BAC3F2 /* XPRoomPKProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKProtocol.h; sourceTree = "<group>"; };
|
||||
E801274527E3241700BAC3F2 /* Api+RoomPK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+RoomPK.h"; sourceTree = "<group>"; };
|
||||
E801274627E3241700BAC3F2 /* Api+RoomPK.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+RoomPK.m"; sourceTree = "<group>"; };
|
||||
E801274927E327DA00BAC3F2 /* XPRoomPKTypeTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKTypeTableViewCell.h; sourceTree = "<group>"; };
|
||||
E801274A27E327DA00BAC3F2 /* XPRoomPKTypeTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKTypeTableViewCell.m; sourceTree = "<group>"; };
|
||||
E801274C27E3280000BAC3F2 /* XPRoomPKVoteTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKVoteTableViewCell.h; sourceTree = "<group>"; };
|
||||
E801274D27E3280000BAC3F2 /* XPRoomPKVoteTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKVoteTableViewCell.m; sourceTree = "<group>"; };
|
||||
E801274F27E3281100BAC3F2 /* XPRoomPKTimeTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKTimeTableViewCell.h; sourceTree = "<group>"; };
|
||||
E801275027E3281100BAC3F2 /* XPRoomPKTimeTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKTimeTableViewCell.m; sourceTree = "<group>"; };
|
||||
E801275327E3326000BAC3F2 /* XPRoomPKUserView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKUserView.h; sourceTree = "<group>"; };
|
||||
E801275427E3326000BAC3F2 /* XPRoomPKUserView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKUserView.m; sourceTree = "<group>"; };
|
||||
E801275627E347FD00BAC3F2 /* RoomPKRecordModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomPKRecordModel.h; sourceTree = "<group>"; };
|
||||
E801275727E347FD00BAC3F2 /* RoomPKRecordModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomPKRecordModel.m; sourceTree = "<group>"; };
|
||||
E80487632717DDD9008595F2 /* XPRoomMenuItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMenuItem.h; sourceTree = "<group>"; };
|
||||
E80487642717DDD9008595F2 /* XPRoomMenuItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMenuItem.m; sourceTree = "<group>"; };
|
||||
E8098CB2282E97550090B9F0 /* XPMineBlackListPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineBlackListPresenter.h; sourceTree = "<group>"; };
|
||||
@@ -3849,6 +3874,7 @@
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
|
||||
E800805227FD33950055A8AB /* Guild */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -3870,6 +3896,26 @@
|
||||
E8C167202806A0BA00ECB15C /* Setting */,
|
||||
E8C1671F2806A0AC00ECB15C /* Income */,
|
||||
E8C1671E2806A0A200ECB15C /* SuperAdmin */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E801273827E322D700BAC3F2 /* RoomPK */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E801273D27E3230F00BAC3F2 /* Model */,
|
||||
E801273C27E3230400BAC3F2 /* Api */,
|
||||
E801273B27E322FE00BAC3F2 /* View */,
|
||||
E801273A27E322F500BAC3F2 /* Presenter */,
|
||||
E801273927E322E900BAC3F2 /* Protocol */,
|
||||
);
|
||||
path = RoomPK;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E801273927E322E900BAC3F2 /* Protocol */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E801274427E3240000BAC3F2 /* XPRoomPKProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
@@ -3886,10 +3932,21 @@
|
||||
E8C1671B2806A06D00ECB15C /* Setting */,
|
||||
E8C1671A2806A05B00ECB15C /* Income */,
|
||||
E8C167192806A04300ECB15C /* SuperAdmin */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
|
||||
E801273A27E322F500BAC3F2 /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E801274127E323E500BAC3F2 /* XPRoomPKPresenter.h */,
|
||||
E801274227E323E500BAC3F2 /* XPRoomPKPresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
|
||||
E800805527FD33DF0055A8AB /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -3904,10 +3961,22 @@
|
||||
E8C1670528067D5F00ECB15C /* Setting */,
|
||||
E8C1670428067D3200ECB15C /* IncomeStatis */,
|
||||
E8C1670628067D8A00ECB15C /* SuperAdmin */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E801273B27E322FE00BAC3F2 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E801275227E3321C00BAC3F2 /* SubViews */,
|
||||
E801274827E3278E00BAC3F2 /* Cell */,
|
||||
E801273E27E323C800BAC3F2 /* XPRoomPKViewController.h */,
|
||||
E801273F27E323C800BAC3F2 /* XPRoomPKViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
|
||||
E800805627FD33E90055A8AB /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -3956,6 +4025,37 @@
|
||||
E8C1670F28067E8D00ECB15C /* Setting */,
|
||||
E8C1670D28067E1500ECB15C /* Income */,
|
||||
E8C1670E28067E3100ECB15C /* SuperAdmin */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E801273C27E3230400BAC3F2 /* Api */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E801274527E3241700BAC3F2 /* Api+RoomPK.h */,
|
||||
E801274627E3241700BAC3F2 /* Api+RoomPK.m */,
|
||||
);
|
||||
path = Api;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E801273D27E3230F00BAC3F2 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E801275627E347FD00BAC3F2 /* RoomPKRecordModel.h */,
|
||||
E801275727E347FD00BAC3F2 /* RoomPKRecordModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E801274827E3278E00BAC3F2 /* Cell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E801274927E327DA00BAC3F2 /* XPRoomPKTypeTableViewCell.h */,
|
||||
E801274A27E327DA00BAC3F2 /* XPRoomPKTypeTableViewCell.m */,
|
||||
E801274C27E3280000BAC3F2 /* XPRoomPKVoteTableViewCell.h */,
|
||||
E801274D27E3280000BAC3F2 /* XPRoomPKVoteTableViewCell.m */,
|
||||
E801274F27E3281100BAC3F2 /* XPRoomPKTimeTableViewCell.h */,
|
||||
E801275027E3281100BAC3F2 /* XPRoomPKTimeTableViewCell.m */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
@@ -3983,6 +4083,16 @@
|
||||
E855515028055581005F293F /* XPGuildTimeMonthPickerView.m */,
|
||||
E8C167312806CADF00ECB15C /* XPGuildSuperAdminMenuView.h */,
|
||||
E8C167322806CADF00ECB15C /* XPGuildSuperAdminMenuView.m */,
|
||||
);
|
||||
path = SubViews;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
|
||||
E801275227E3321C00BAC3F2 /* SubViews */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E801275327E3326000BAC3F2 /* XPRoomPKUserView.h */,
|
||||
E801275427E3326000BAC3F2 /* XPRoomPKUserView.m */,
|
||||
);
|
||||
path = SubViews;
|
||||
sourceTree = "<group>";
|
||||
@@ -5336,6 +5446,7 @@
|
||||
9B6E8570281AAD260041A321 /* RoomRecommend */,
|
||||
9B1B72A228002F76003FACE9 /* AnchorPK */,
|
||||
9B92C01A27E0BAEB0044C5EA /* NobleTrumpet */,
|
||||
E801273827E322D700BAC3F2 /* RoomPK */,
|
||||
9B7B605827BB52FD0070BB72 /* AnchorView */,
|
||||
E81EF6D9279AB59100FF3EDE /* LittleGame */,
|
||||
E880B396278BD3D800A83B0D /* AcrossRoomPK */,
|
||||
@@ -6647,6 +6758,7 @@
|
||||
E81EF6E8279AC21E00FF3EDE /* Api+LittleGame.m in Sources */,
|
||||
E8EEB91126FC6AE2007C6EBA /* XPMineUserInfoEditProtocol.h in Sources */,
|
||||
180116FC279E8CCE00F2CBC0 /* NVDate.m in Sources */,
|
||||
E801275827E347FD00BAC3F2 /* RoomPKRecordModel.m in Sources */,
|
||||
E8A86E0427BA38DB001C21F9 /* SudCommon.m in Sources */,
|
||||
E8EEB90326FC31DC007C6EBA /* XPMineUserInfoProtocol.h in Sources */,
|
||||
E8232603274E4AA0003A3332 /* ThemeColor+UserCard.m in Sources */,
|
||||
@@ -6946,6 +7058,7 @@
|
||||
E8E859D228264C2300EE4857 /* HTTPServer.m in Sources */,
|
||||
E8C167182806A03800ECB15C /* XPSuperAdminSetPresenter.m in Sources */,
|
||||
9B6E856E281AABAB0041A321 /* XPRoomRecommendModel.m in Sources */,
|
||||
E801274B27E327DA00BAC3F2 /* XPRoomPKTypeTableViewCell.m in Sources */,
|
||||
E8C6FFCA27548120004DC9F0 /* XPHomePresenter.m in Sources */,
|
||||
E8412FB02779CB4D006E1101 /* XPRoomSettingPresenter.m in Sources */,
|
||||
E8C1671228067F6C00ECB15C /* XPGuildChooseManagerRoomTableViewCell.m in Sources */,
|
||||
@@ -6965,6 +7078,7 @@
|
||||
E8E859CC28264C2300EE4857 /* MultipartFormDataParser.m in Sources */,
|
||||
E800807C27FD84980055A8AB /* GuildInfoModel.m in Sources */,
|
||||
E8A03DF0276303D40098D9EA /* XPCandyTreeRankTableViewCell.m in Sources */,
|
||||
E801274E27E3280000BAC3F2 /* XPRoomPKVoteTableViewCell.m in Sources */,
|
||||
9BCF58532798FDA1008401A4 /* XPSkillCardModel.m in Sources */,
|
||||
18E7B1B726E8B2D10064BC9B /* Api+Main.m in Sources */,
|
||||
E8B846D326FDDBE600A777FE /* XPMineRechargeTableViewCell.m in Sources */,
|
||||
@@ -7018,6 +7132,7 @@
|
||||
E8EEB90626FC5772007C6EBA /* XPMineUserInfoEditViewController.m in Sources */,
|
||||
E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */,
|
||||
E8834E53280052580029CCC1 /* XPMineGuildManagerPerTableViewCell.m in Sources */,
|
||||
E801274027E323C800BAC3F2 /* XPRoomPKViewController.m in Sources */,
|
||||
E8EEB91426FC7786007C6EBA /* XPMineUserInfoNickViewController.m in Sources */,
|
||||
18E7B31B26F0982E0064BC9B /* UserExpand.m in Sources */,
|
||||
9BDA3E7D27FD47AB00517FE6 /* XPAnchorFansTeamPresenter.m in Sources */,
|
||||
@@ -7128,6 +7243,7 @@
|
||||
E880B3AF278BE1D800A83B0D /* Api+AcrossRoomPK.m in Sources */,
|
||||
E88C72992828F3620047FB2B /* XPRoomMusicLibraryTableViewCell.m in Sources */,
|
||||
E8D34D4728080295009C4835 /* XPMineUserDataViewController.m in Sources */,
|
||||
E801275127E3281100BAC3F2 /* XPRoomPKTimeTableViewCell.m in Sources */,
|
||||
E8EEB90F26FC6AB8007C6EBA /* XPMineUserInfoEditPresenter.m in Sources */,
|
||||
E873EB09280960990071030D /* XPMineUserInfoVoiceCardView.m in Sources */,
|
||||
E8AC723A26F49AAE007D6E91 /* XPMineNotifyStatus.m in Sources */,
|
||||
@@ -7167,6 +7283,7 @@
|
||||
186A536926FC6F2E00D67B2C /* XPShareView.m in Sources */,
|
||||
9BC5C91C277C8A7B007C8719 /* XPReleaseRadioViewController.m in Sources */,
|
||||
186A534C26FC6ED900D67B2C /* TTAlertView.m in Sources */,
|
||||
E801275527E3326000BAC3F2 /* XPRoomPKUserView.m in Sources */,
|
||||
E8D4824D278D2CE4003C1D08 /* XPAcrossRoomPKInviteResultView.m in Sources */,
|
||||
E866B6E52759F96F009B002A /* XPMiniRoomView.m in Sources */,
|
||||
9B7B605B27BB53060070BB72 /* XPAnchorAudienceUpMicView.m in Sources */,
|
||||
@@ -7265,6 +7382,7 @@
|
||||
E89BD7D4277D471100E31B19 /* XPRoomOnlineTableViewCell.m in Sources */,
|
||||
E8412F9627795E34006E1101 /* XPRoomInviteFansView.m in Sources */,
|
||||
E80CBDE627D0C1CF001E1EC2 /* HomeMenuSourceModel.m in Sources */,
|
||||
E801274327E323E500BAC3F2 /* XPRoomPKPresenter.m in Sources */,
|
||||
189DD75026E21D9000AB55B1 /* GCDHelper.m in Sources */,
|
||||
E82D5C76276AEB5100858D6D /* NameplateModel.m in Sources */,
|
||||
E800806227FD373D0055A8AB /* XPClanMemberTableViewCell.m in Sources */,
|
||||
@@ -7349,6 +7467,7 @@
|
||||
E8001632280409FD00D6D17A /* XPGuildPersonIncomeTableViewCell.m in Sources */,
|
||||
E873EB05280943ED0071030D /* XPMineUserInfoGiftWallPresenter.m in Sources */,
|
||||
E85551642805937A005F293F /* XPGuildIncomeDetailCollectionViewCell.m in Sources */,
|
||||
E801274727E3241700BAC3F2 /* Api+RoomPK.m in Sources */,
|
||||
E80CBDEA27D0C53F001E1EC2 /* XPWeakTimer.m in Sources */,
|
||||
189DD55026DE37F900AB55B1 /* MvpViewController.m in Sources */,
|
||||
E81366F326F0B7C80076364C /* LoginFullInfoViewController.m in Sources */,
|
||||
|
22
xplan-ios/Assets.xcassets/Common/common_right_arrow.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "common_right_arrow@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "common_right_arrow@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Common/common_right_arrow.imageset/common_right_arrow@2x.png
vendored
Normal file
After Width: | Height: | Size: 316 B |
BIN
xplan-ios/Assets.xcassets/Common/common_right_arrow.imageset/common_right_arrow@3x.png
vendored
Normal file
After Width: | Height: | Size: 399 B |
6
xplan-ios/Assets.xcassets/Room/RoomPK/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
22
xplan-ios/Assets.xcassets/Room/RoomPK/room_more_menu_pk_close.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_more_menu_pk_close@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_more_menu_pk_close@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 533 B |
After Width: | Height: | Size: 855 B |
22
xplan-ios/Assets.xcassets/Room/RoomPK/room_more_menu_pk_open.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_more_menu_pk_open@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_more_menu_pk_open@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Room/RoomPK/room_more_menu_pk_open.imageset/room_more_menu_pk_open@2x.png
vendored
Normal file
After Width: | Height: | Size: 882 B |
BIN
xplan-ios/Assets.xcassets/Room/RoomPK/room_more_menu_pk_open.imageset/room_more_menu_pk_open@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
22
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_position_blue_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_position_blue_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_position_blue_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 1.2 KiB |
22
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_position_red_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_position_red_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_position_red_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 779 B |
After Width: | Height: | Size: 1.2 KiB |
22
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_vote_normal.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_vote_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_vote_normal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_vote_normal.imageset/room_pk_vote_normal@2x.png
vendored
Normal file
After Width: | Height: | Size: 775 B |
BIN
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_vote_normal.imageset/room_pk_vote_normal@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
22
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_vote_select.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_vote_select@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_vote_select@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_vote_select.imageset/room_pk_vote_select@2x.png
vendored
Normal file
After Width: | Height: | Size: 984 B |
BIN
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_vote_select.imageset/room_pk_vote_select@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.6 KiB |
22
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_vs_logo.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_vs_logo@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_pk_vs_logo@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_vs_logo.imageset/room_pk_vs_logo@2x.png
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_vs_logo.imageset/room_pk_vs_logo@3x.png
vendored
Normal file
After Width: | Height: | Size: 3.4 KiB |
@@ -38,7 +38,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<string>2022031701</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>pubgmhd1106467070</string>
|
||||
|
@@ -44,6 +44,10 @@ typedef NS_ENUM(NSInteger, RoomMoreMenuType) {
|
||||
RoomMoreMenuType_Room_Anchor_PK_Close = 16,
|
||||
///清空公屏
|
||||
RoomMoreMenuType_Message_Screen_Clear = 17,
|
||||
///开启房间pk
|
||||
RoomMoreMenuType_Room_PK_Open = 18,
|
||||
///关闭房间pk
|
||||
RoomMoreMenuType_Room_PK_Close = 19,
|
||||
};
|
||||
|
||||
@interface XPRoomMoreItemModel : NSObject
|
||||
|
@@ -22,7 +22,12 @@
|
||||
|
||||
@implementation XPMoreMenuPresenter
|
||||
|
||||
- (void)getMoreMenuDataSource:(RoomInfoModel *)roomInfo isSuperAdmin:(BOOL)isSuperAdmin{
|
||||
- (void)getMoreMenuDataSource:(RoomInfoModel *)roomInfo isSuperAdmin:(BOOL)isSuperAdmin {
|
||||
XPRoomMoreItemModel * roomPK = [[XPRoomMoreItemModel alloc] init];
|
||||
roomPK.title = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? @"PK中..." : @"PK模式";
|
||||
roomPK.imageName= roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? @"room_more_menu_pk_close" : @"room_more_menu_pk_open";
|
||||
roomPK.type = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? RoomMoreMenuType_Room_PK_Close : RoomMoreMenuType_Room_PK_Open;
|
||||
roomPK.titleColor = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? [ThemeColor roomMoreMenuTextColor] : nil;
|
||||
|
||||
XPRoomMoreItemModel * giftValue = [[XPRoomMoreItemModel alloc] init];
|
||||
giftValue.title = roomInfo.showGiftValue ? @"关闭礼物值" : @"开启礼物值";
|
||||
@@ -112,10 +117,16 @@
|
||||
NIMChatroomMember * member = members.firstObject;
|
||||
BOOL isCreator = member.type == NIMChatroomMemberTypeCreator;
|
||||
BOOL isManager = member.type == NIMChatroomMemberTypeManager;
|
||||
|
||||
if ((isCreator || isSuperAdmin) && roomInfo.isPermitRoom == PermitRoomType_Licnese && roomInfo.type != RoomType_MiniGame) {
|
||||
if (roomInfo.type != RoomType_MiniGame) {
|
||||
[array addObject:roomPK];
|
||||
}
|
||||
}
|
||||
|
||||
if (isCreator && roomInfo.isPermitRoom == PermitRoomType_Licnese && roomInfo.type != RoomType_MiniGame) {
|
||||
[array addObject:acrossRoomPK];
|
||||
}
|
||||
|
||||
if (isCreator && roomInfo.type == RoomType_Anchor) {
|
||||
[array addObject:anchorRoomPK];
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#import "XPRoomSettingViewController.h"
|
||||
#import "XPReleaseRadioViewController.h"
|
||||
#import "XPRoomTrumpetViewController.h"
|
||||
#import "XPRoomPKViewController.h"
|
||||
///P
|
||||
#import "XPMoreMenuPresenter.h"
|
||||
#import "XPMoreMenuProtocol.h"
|
||||
@@ -367,6 +368,19 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
}];
|
||||
}
|
||||
break;
|
||||
|
||||
case RoomMoreMenuType_Room_PK_Open:
|
||||
{
|
||||
XPRoomPKViewController * roomPKVC = [[XPRoomPKViewController alloc] init];
|
||||
[self.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES];
|
||||
}
|
||||
break;
|
||||
case RoomMoreMenuType_Room_PK_Close:
|
||||
{
|
||||
XPRoomPKViewController * roomPKVC = [[XPRoomPKViewController alloc] init];
|
||||
[self.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
16
xplan-ios/Main/Room/View/RoomPK/Api/Api+RoomPK.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Api+RoomPK.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "Api.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api (RoomPK)
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Room/View/RoomPK/Api/Api+RoomPK.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// Api+RoomPK.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "Api+RoomPK.h"
|
||||
|
||||
@implementation Api (RoomPK)
|
||||
|
||||
@end
|
16
xplan-ios/Main/Room/View/RoomPK/Model/RoomPKRecordModel.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// RoomPKRecordModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RoomPKRecordModel : NSObject
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Room/View/RoomPK/Model/RoomPKRecordModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// RoomPKRecordModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "RoomPKRecordModel.h"
|
||||
|
||||
@implementation RoomPKRecordModel
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPRoomPKPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomPKPresenter : BaseMvpPresenter
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPRoomPKPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "XPRoomPKPresenter.h"
|
||||
|
||||
@implementation XPRoomPKPresenter
|
||||
|
||||
@end
|
16
xplan-ios/Main/Room/View/RoomPK/Protocol/XPRoomPKProtocol.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPRoomPKProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPRoomPKProtocol <NSObject>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// XPRoomPKTimeTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomPKTimeTableViewCell : UITableViewCell
|
||||
|
||||
///选择的时间
|
||||
@property (nonatomic,copy) NSString *time;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// XPRoomPKTimeTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "XPRoomPKTimeTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
|
||||
@interface XPRoomPKTimeTableViewCell ()
|
||||
///显示标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///显示时间
|
||||
@property (nonatomic,strong) UILabel *timeLabel;
|
||||
///箭头
|
||||
@property (nonatomic,strong) UIImageView *arrowImageView;
|
||||
@end
|
||||
|
||||
@implementation XPRoomPKTimeTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
self.contentView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.timeLabel];
|
||||
[self.contentView addSubview:self.arrowImageView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView).offset(15);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.contentView).offset(-15);
|
||||
make.size.mas_equalTo(CGSizeMake(6.5, 11));
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.arrowImageView.mas_left).offset(-3);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setTime:(NSString *)time {
|
||||
_time = time;
|
||||
self.timeLabel.text = _time;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = @"PK时间";
|
||||
_titleLabel.font = [UIFont boldSystemFontOfSize:15];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)timeLabel {
|
||||
if (!_timeLabel) {
|
||||
_timeLabel = [[UILabel alloc] init];
|
||||
_timeLabel.text = @"30秒";
|
||||
_timeLabel.font = [UIFont systemFontOfSize:14];
|
||||
_timeLabel.textColor = [ThemeColor secondTextColor];
|
||||
}
|
||||
return _timeLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)arrowImageView {
|
||||
if (!_arrowImageView) {
|
||||
_arrowImageView = [[UIImageView alloc] init];
|
||||
_arrowImageView.userInteractionEnabled = YES;
|
||||
_arrowImageView.image = [UIImage imageNamed:@"common_right_arrow"];
|
||||
}
|
||||
return _arrowImageView;
|
||||
}
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPRoomPKTypeTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomPKTypeTableViewCell : UITableViewCell
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// XPRoomPKTypeTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "XPRoomPKTypeTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
|
||||
@interface XPRoomPKTypeTableViewCell ()
|
||||
///显示标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///类型
|
||||
@property (nonatomic,strong) UILabel *typeLabel;
|
||||
///分割线
|
||||
@property (nonatomic,strong) UIView * lineView;
|
||||
@end
|
||||
|
||||
@implementation XPRoomPKTypeTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
self.contentView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.typeLabel];
|
||||
[self.contentView addSubview:self.lineView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView).offset(15);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
|
||||
[self.typeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.titleLabel.mas_right).offset(20);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.contentView);
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
make.height.mas_equalTo(1);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = @"PK模式";
|
||||
_titleLabel.font = [UIFont boldSystemFontOfSize:15];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)typeLabel {
|
||||
if (!_typeLabel) {
|
||||
_typeLabel = [[UILabel alloc] init];
|
||||
_typeLabel.text = @"按团队PK";
|
||||
_typeLabel.font = [UIFont systemFontOfSize:14];
|
||||
_typeLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _typeLabel;
|
||||
}
|
||||
|
||||
- (UIView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[UIView alloc] init];
|
||||
_lineView.backgroundColor = [ThemeColor dividerColor];
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPRoomPKVoteTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomPKVoteTableViewCell : UITableViewCell
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,181 @@
|
||||
//
|
||||
// XPRoomPKVoteTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "XPRoomPKVoteTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
|
||||
@interface XPRoomPKVoteTableViewCell ()
|
||||
///显示标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///礼物价值容器
|
||||
@property (nonatomic,strong) UIStackView *giftValueStackView;
|
||||
///选择礼物价值
|
||||
@property (nonatomic,strong) UIButton *giftValueChooseButton;
|
||||
///礼物价值
|
||||
@property (nonatomic,strong) UILabel *giftValueLabel;
|
||||
///送礼人数容器
|
||||
@property (nonatomic,strong) UIStackView *giftNumStackView;
|
||||
///选择送礼人数
|
||||
@property (nonatomic,strong) UIButton *giftNumChooseButton;
|
||||
///送礼人数
|
||||
@property (nonatomic,strong) UILabel *giftNumLabel;
|
||||
///类型
|
||||
@property (nonatomic,strong) UILabel *typeLabel;
|
||||
///分割线
|
||||
@property (nonatomic,strong) UIView * lineView;
|
||||
@end
|
||||
|
||||
@implementation XPRoomPKVoteTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
self.contentView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.giftValueStackView];
|
||||
[self.contentView addSubview:self.giftNumStackView];
|
||||
[self.contentView addSubview:self.lineView];
|
||||
|
||||
[self.giftValueStackView addArrangedSubview:self.giftValueChooseButton];
|
||||
[self.giftValueStackView addArrangedSubview:self.giftValueLabel];
|
||||
[self.giftNumStackView addArrangedSubview:self.giftNumChooseButton];
|
||||
[self.giftNumStackView addArrangedSubview:self.giftNumLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView).offset(15);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
|
||||
[self.giftValueStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView).offset(92);
|
||||
make.top.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.giftValueChooseButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(15, 15));
|
||||
}];
|
||||
|
||||
[self.giftNumStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.giftValueStackView.mas_right).offset(15);
|
||||
make.top.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.giftNumChooseButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(15, 15));
|
||||
}];
|
||||
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.contentView);
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
make.height.mas_equalTo(1);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)chooseRoomPKVoteAction:(UIButton *)sender {
|
||||
self.giftValueChooseButton.selected = NO;
|
||||
self.giftNumChooseButton.selected = NO;
|
||||
sender.selected = !sender.selected;
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = @"投票类型";
|
||||
_titleLabel.font = [UIFont boldSystemFontOfSize:15];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIStackView *)giftValueStackView {
|
||||
if (!_giftValueStackView) {
|
||||
_giftValueStackView = [[UIStackView alloc] init];
|
||||
_giftValueStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_giftValueStackView.distribution = UIStackViewDistributionFill;
|
||||
_giftValueStackView.alignment = UIStackViewAlignmentFill;
|
||||
_giftValueStackView.spacing = 5;
|
||||
}
|
||||
return _giftValueStackView;
|
||||
}
|
||||
|
||||
- (UIButton *)giftValueChooseButton {
|
||||
if (!_giftValueChooseButton) {
|
||||
_giftValueChooseButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_giftValueChooseButton setImage:[UIImage imageNamed:@"room_pk_vote_normal"] forState:UIControlStateNormal];
|
||||
[_giftValueChooseButton setImage:[UIImage imageNamed:@"room_pk_vote_select"] forState:UIControlStateSelected];
|
||||
[_giftValueChooseButton addTarget:self action:@selector(chooseRoomPKVoteAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_giftValueChooseButton.selected = YES;
|
||||
}
|
||||
return _giftValueChooseButton;
|
||||
}
|
||||
|
||||
- (UILabel *)giftValueLabel {
|
||||
if (!_giftValueLabel) {
|
||||
_giftValueLabel = [[UILabel alloc] init];
|
||||
_giftValueLabel.textColor = [ThemeColor secondTextColor];
|
||||
_giftValueLabel.font = [UIFont systemFontOfSize:14];
|
||||
_giftValueLabel.text = @"按礼物价值";
|
||||
}
|
||||
return _giftValueLabel;
|
||||
}
|
||||
|
||||
- (UIStackView *)giftNumStackView {
|
||||
if (!_giftNumStackView) {
|
||||
_giftNumStackView = [[UIStackView alloc] init];
|
||||
_giftNumStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_giftNumStackView.distribution = UIStackViewDistributionFill;
|
||||
_giftNumStackView.alignment = UIStackViewAlignmentFill;
|
||||
_giftNumStackView.spacing = 5;
|
||||
}
|
||||
return _giftNumStackView;
|
||||
}
|
||||
|
||||
- (UIButton *)giftNumChooseButton {
|
||||
if (!_giftNumChooseButton) {
|
||||
_giftNumChooseButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_giftNumChooseButton setImage:[UIImage imageNamed:@"room_pk_vote_normal"] forState:UIControlStateNormal];
|
||||
[_giftNumChooseButton setImage:[UIImage imageNamed:@"room_pk_vote_select"] forState:UIControlStateSelected];
|
||||
[_giftNumChooseButton addTarget:self action:@selector(chooseRoomPKVoteAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _giftNumChooseButton;
|
||||
}
|
||||
|
||||
- (UILabel *)giftNumLabel {
|
||||
if (!_giftNumLabel) {
|
||||
_giftNumLabel = [[UILabel alloc] init];
|
||||
_giftNumLabel.textColor = [ThemeColor secondTextColor];
|
||||
_giftNumLabel.font = [UIFont systemFontOfSize:14];
|
||||
_giftNumLabel.text = @"按送礼人数";
|
||||
}
|
||||
return _giftNumLabel;
|
||||
}
|
||||
|
||||
- (UIView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[UIView alloc] init];
|
||||
_lineView.backgroundColor = [ThemeColor dividerColor];
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPRoomPKUserView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef NS_ENUM(NSInteger,RoomPKUserViewType) {
|
||||
RoomPKUserViewType_Red = 1,
|
||||
RoomPKUserViewType_Blue
|
||||
};
|
||||
|
||||
|
||||
@interface XPRoomPKUserView : UIView
|
||||
@property (nonatomic,assign) RoomPKUserViewType type;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
102
xplan-ios/Main/Room/View/RoomPK/View/SubViews/XPRoomPKUserView.m
Normal file
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// XPRoomPKUserView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "XPRoomPKUserView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "NetImageView.h"
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
|
||||
@interface XPRoomPKUserView ()
|
||||
///头像
|
||||
@property (nonatomic,strong) NetImageView *avatarImageView;
|
||||
///昵称
|
||||
@property (nonatomic,strong) UIButton *nickButton;
|
||||
@end
|
||||
|
||||
@implementation XPRoomPKUserView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.avatarImageView];
|
||||
[self addSubview:self.nickButton];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.top.mas_equalTo(self);
|
||||
make.height.width.mas_equalTo(50);
|
||||
}];
|
||||
|
||||
[self.nickButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(3);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setType:(RoomPKUserViewType)type {
|
||||
_type = type;
|
||||
switch (_type) {
|
||||
case RoomPKUserViewType_Red:
|
||||
{
|
||||
self.avatarImageView.image = [UIImage imageNamed:@"room_pk_position_red_bg"];
|
||||
[self.nickButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFC4A95), UIColorFromRGB(0xFE6075)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
}
|
||||
break;
|
||||
case RoomPKUserViewType_Blue:
|
||||
{
|
||||
self.avatarImageView.image = [UIImage imageNamed:@"room_pk_position_blue_bg"];
|
||||
[self.nickButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x3571FE), UIColorFromRGB(0x7994FC)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
if (!_avatarImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 38/2;
|
||||
_avatarImageView.layer.borderColor = [ThemeColor appMainColor].CGColor;
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UIButton *)nickButton {
|
||||
if (!_nickButton) {
|
||||
_nickButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_nickButton setTitle:@"等待上麦" forState:UIControlStateNormal];
|
||||
[_nickButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_nickButton.titleLabel.font = [UIFont systemFontOfSize:10];
|
||||
_nickButton.layer.masksToBounds = YES;
|
||||
_nickButton.layer.cornerRadius = 7;
|
||||
}
|
||||
return _nickButton;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPRoomPKViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomPKViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
281
xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKViewController.m
Normal file
@@ -0,0 +1,281 @@
|
||||
//
|
||||
// XPRoomPKViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/3/17.
|
||||
//
|
||||
|
||||
#import "XPRoomPKViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
///View
|
||||
#import "XPRoomPKVoteTableViewCell.h"
|
||||
#import "XPRoomPKTypeTableViewCell.h"
|
||||
#import "XPRoomPKTimeTableViewCell.h"
|
||||
#import "XPRoomPKUserView.h"
|
||||
@interface XPRoomPKViewController ()<UITableViewDelegate, UITableViewDataSource>
|
||||
///用户的容器
|
||||
@property (nonatomic,strong) UIView * userContainerView;
|
||||
///红队
|
||||
@property (nonatomic,strong) NSArray *redTeamViews;
|
||||
///蓝队
|
||||
@property (nonatomic,strong) NSArray *blueTeamViews;
|
||||
///房间pklogo
|
||||
@property (nonatomic,strong) UIImageView *roomPKLogoImageView;
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///创建pk的容器
|
||||
@property (nonatomic,strong) UIStackView *createPKStackView;
|
||||
///创建PK
|
||||
@property (nonatomic,strong) UIButton *createPKButton;
|
||||
///再次创建
|
||||
@property (nonatomic,strong) UIButton *onceAgainPKButton;
|
||||
///关闭PK
|
||||
@property (nonatomic,strong) UIButton *closePKButton;
|
||||
@end
|
||||
|
||||
@implementation XPRoomPKViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.title = @"创建PK";
|
||||
[self addNavigationItemWithTitles:@[@"PK记录"] titleColor:[ThemeColor mainTextColor] isLeft:NO target:self action:@selector(rightNavAction:) tags:nil];
|
||||
[self.view addSubview:self.userContainerView];
|
||||
[self.view addSubview:self.tableView];
|
||||
[self.view addSubview:self.createPKStackView];
|
||||
|
||||
[self.createPKStackView addArrangedSubview:self.createPKButton];
|
||||
[self.createPKStackView addArrangedSubview:self.onceAgainPKButton];
|
||||
[self.createPKStackView addArrangedSubview:self.closePKButton];
|
||||
|
||||
[self.userContainerView addSubview:self.roomPKLogoImageView];
|
||||
[self initUserContainerSubViews];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
XPRoomPKUserView * userView = [self.redTeamViews lastObject];
|
||||
[self.userContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.view).offset(10);
|
||||
make.bottom.mas_equalTo(userView.mas_bottom).offset(20);
|
||||
}];
|
||||
|
||||
[self.roomPKLogoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.mas_equalTo(self.userContainerView);
|
||||
make.width.mas_equalTo(43);
|
||||
make.height.mas_equalTo(64);
|
||||
}];
|
||||
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.userContainerView.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.createPKStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.view).inset(47);
|
||||
make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 20);
|
||||
}];
|
||||
|
||||
[self.createPKButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(44);
|
||||
}];
|
||||
|
||||
[self.onceAgainPKButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(44);
|
||||
}];
|
||||
|
||||
[self.closePKButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(44);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)initUserContainerSubViews {
|
||||
CGFloat itemWidth = 60;
|
||||
CGFloat itemHeight = 67;
|
||||
CGFloat pkItemWidth = 72;
|
||||
CGFloat pkItemMargeHeight = 10;
|
||||
CGFloat itemSpace = (KScreenWidth - itemWidth * 4 - 72 - 13 * 2)/ 2;
|
||||
NSMutableArray * redArray = [NSMutableArray array];
|
||||
for (int i = 0; i< 4; i++) {
|
||||
XPRoomPKUserView * redView = [[XPRoomPKUserView alloc] init];
|
||||
[redArray addObject:redView];
|
||||
redView.type = RoomPKUserViewType_Red;
|
||||
[self.userContainerView addSubview:redView];
|
||||
[redView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(itemWidth, itemHeight));
|
||||
make.left.mas_equalTo(self.userContainerView).offset(13+ i % 2 * (itemWidth + itemSpace));
|
||||
make.top.mas_equalTo(self.userContainerView).offset(i / 2 *(itemHeight + pkItemMargeHeight));
|
||||
}];
|
||||
}
|
||||
self.redTeamViews = [redArray copy];
|
||||
|
||||
NSMutableArray * blueArray = [NSMutableArray array];
|
||||
for (int i = 0; i< 4; i++) {
|
||||
XPRoomPKUserView * blueView = [[XPRoomPKUserView alloc] init];
|
||||
[blueArray addObject:blueView];
|
||||
blueView.type = RoomPKUserViewType_Blue;
|
||||
[self.userContainerView addSubview:blueView];
|
||||
[blueView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(itemWidth, itemHeight));
|
||||
make.left.mas_equalTo(self.userContainerView).offset(13 + itemWidth * 2 + itemSpace + pkItemWidth + i % 2 * (itemWidth + itemSpace));
|
||||
make.top.mas_equalTo(self.userContainerView).offset(i / 2 *(itemHeight + pkItemMargeHeight));
|
||||
}];
|
||||
}
|
||||
self.blueTeamViews = [blueArray copy];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return 3;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 50;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.row == 0) {
|
||||
XPRoomPKTypeTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPRoomPKTypeTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPRoomPKTypeTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomPKTypeTableViewCell class])];
|
||||
}
|
||||
return cell;
|
||||
} else if(indexPath.row == 1) {
|
||||
XPRoomPKVoteTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPRoomPKVoteTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPRoomPKVoteTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomPKVoteTableViewCell class])];
|
||||
}
|
||||
return cell;
|
||||
} else {
|
||||
XPRoomPKTimeTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPRoomPKTimeTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPRoomPKTimeTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomPKTimeTableViewCell class])];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)createPKButtonAction:(UIButton *)sender {
|
||||
//TODO: 创建pk
|
||||
}
|
||||
|
||||
- (void)closePKButtonAction:(UIButton *)sender {
|
||||
//TODO: 关闭PK
|
||||
}
|
||||
|
||||
- (void)onceAgainPKButtonAction:(UIButton *)sender {
|
||||
//TODO: 再次创建
|
||||
}
|
||||
|
||||
- (void)rightNavAction:(UIButton *)sender {
|
||||
//TODO: pk记录
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
_tableView.scrollEnabled = NO;
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPRoomPKVoteTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPRoomPKVoteTableViewCell class])];
|
||||
[_tableView registerClass:[XPRoomPKTypeTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPRoomPKTypeTableViewCell class])];
|
||||
[_tableView registerClass:[XPRoomPKTimeTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPRoomPKTimeTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (UIStackView *)createPKStackView {
|
||||
if (!_createPKStackView) {
|
||||
_createPKStackView = [[UIStackView alloc] init];
|
||||
_createPKStackView.axis = UILayoutConstraintAxisVertical;
|
||||
_createPKStackView.distribution = UIStackViewDistributionFill;
|
||||
_createPKStackView.alignment = UIStackViewAlignmentFill;
|
||||
_createPKStackView.spacing = 10;
|
||||
}
|
||||
return _createPKStackView;
|
||||
}
|
||||
|
||||
- (UIButton *)createPKButton {
|
||||
if (!_createPKButton) {
|
||||
_createPKButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_createPKButton setTitle:@"确定" forState:UIControlStateNormal];
|
||||
[_createPKButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_createPKButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_createPKButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
_createPKButton.layer.masksToBounds = YES;
|
||||
_createPKButton.layer.cornerRadius = 22;
|
||||
[_createPKButton addTarget:self action:@selector(createPKButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _createPKButton;
|
||||
}
|
||||
|
||||
- (UIButton *)onceAgainPKButton {
|
||||
if (!_onceAgainPKButton) {
|
||||
_onceAgainPKButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_onceAgainPKButton setTitle:@"再次创建" forState:UIControlStateNormal];
|
||||
[_onceAgainPKButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_onceAgainPKButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_onceAgainPKButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
_onceAgainPKButton.layer.masksToBounds = YES;
|
||||
_onceAgainPKButton.layer.cornerRadius = 22;
|
||||
[_onceAgainPKButton addTarget:self action:@selector(onceAgainPKButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_onceAgainPKButton.hidden = YES;
|
||||
}
|
||||
return _onceAgainPKButton;
|
||||
}
|
||||
|
||||
- (UIButton *)closePKButton {
|
||||
if (!_closePKButton) {
|
||||
_closePKButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_closePKButton setTitle:@"关闭PK模式" forState:UIControlStateNormal];
|
||||
[_closePKButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
|
||||
_closePKButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_closePKButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor cancelButtonGradientStartColor], [ThemeColor cancelButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
_closePKButton.layer.masksToBounds = YES;
|
||||
_closePKButton.layer.cornerRadius = 22;
|
||||
[_closePKButton addTarget:self action:@selector(closePKButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_closePKButton.hidden= YES;
|
||||
}
|
||||
return _closePKButton;
|
||||
}
|
||||
|
||||
|
||||
- (UIView *)userContainerView {
|
||||
if (!_userContainerView) {
|
||||
_userContainerView = [[UIView alloc] init];
|
||||
_userContainerView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
}
|
||||
return _userContainerView;
|
||||
}
|
||||
|
||||
- (UIImageView *)roomPKLogoImageView {
|
||||
if (!_roomPKLogoImageView) {
|
||||
_roomPKLogoImageView = [[UIImageView alloc] init];
|
||||
_roomPKLogoImageView.userInteractionEnabled = YES;
|
||||
_roomPKLogoImageView.image = [UIImage imageNamed:@"room_pk_vs_logo"];
|
||||
}
|
||||
return _roomPKLogoImageView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|