航海的UI

This commit is contained in:
fengshuo
2022-08-12 18:58:10 +08:00
parent de53bab244
commit d46b04b6bf
57 changed files with 1592 additions and 0 deletions

View File

@@ -534,6 +534,15 @@
E873EB0F28098D500071030D /* MessageContentGiftView.m in Sources */ = {isa = PBXBuildFile; fileRef = E873EB0E28098D500071030D /* MessageContentGiftView.m */; };
E874B88827215D39003954B9 /* MicroStateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E874B88727215D39003954B9 /* MicroStateModel.m */; };
E874B88B27215EAF003954B9 /* MicroQueueModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E874B88A27215EAF003954B9 /* MicroQueueModel.m */; };
E8751E5928A62A390056EF44 /* Api+Sailing.m in Sources */ = {isa = PBXBuildFile; fileRef = E8751E5828A62A390056EF44 /* Api+Sailing.m */; };
E8751E5C28A62A530056EF44 /* XPSailingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8751E5B28A62A530056EF44 /* XPSailingViewController.m */; };
E8751E5F28A62A970056EF44 /* XPSailingPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8751E5E28A62A970056EF44 /* XPSailingPresenter.m */; };
E8751E6328A646400056EF44 /* XPSailingRankView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8751E6228A646400056EF44 /* XPSailingRankView.m */; };
E8751E6628A6465A0056EF44 /* XPSailingRankSubView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8751E6528A6465A0056EF44 /* XPSailingRankSubView.m */; };
E8751E6B28A64C6E0056EF44 /* XPSailingRankTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8751E6A28A64C6E0056EF44 /* XPSailingRankTableViewCell.m */; };
E8751E6E28A64F990056EF44 /* XPSailingEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8751E6D28A64F990056EF44 /* XPSailingEmptyTableViewCell.m */; };
E8751E7128A6541B0056EF44 /* RoomSailingRankModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8751E7028A6541B0056EF44 /* RoomSailingRankModel.m */; };
E8751E7428A665BC0056EF44 /* RoomSailingInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8751E7328A665BC0056EF44 /* RoomSailingInfoModel.m */; };
E875FA8727D619820086ED04 /* ClientDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E875FA8627D619820086ED04 /* ClientDataModel.m */; };
E877A7EB2783E24700EFACED /* DatingStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = E877A7EA2783E24700EFACED /* DatingStageView.m */; };
E877A7EE278428FB00EFACED /* MicroDatingProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = E877A7ED278428FB00EFACED /* MicroDatingProgressView.m */; };
@@ -1979,6 +1988,25 @@
E874B88727215D39003954B9 /* MicroStateModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroStateModel.m; sourceTree = "<group>"; };
E874B88927215EAF003954B9 /* MicroQueueModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroQueueModel.h; sourceTree = "<group>"; };
E874B88A27215EAF003954B9 /* MicroQueueModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroQueueModel.m; sourceTree = "<group>"; };
E8751E5728A62A390056EF44 /* Api+Sailing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+Sailing.h"; sourceTree = "<group>"; };
E8751E5828A62A390056EF44 /* Api+Sailing.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+Sailing.m"; sourceTree = "<group>"; };
E8751E5A28A62A530056EF44 /* XPSailingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingViewController.h; sourceTree = "<group>"; };
E8751E5B28A62A530056EF44 /* XPSailingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingViewController.m; sourceTree = "<group>"; };
E8751E5D28A62A970056EF44 /* XPSailingPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingPresenter.h; sourceTree = "<group>"; };
E8751E5E28A62A970056EF44 /* XPSailingPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingPresenter.m; sourceTree = "<group>"; };
E8751E6028A62AA60056EF44 /* XPSailingProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingProtocol.h; sourceTree = "<group>"; };
E8751E6128A646400056EF44 /* XPSailingRankView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingRankView.h; sourceTree = "<group>"; };
E8751E6228A646400056EF44 /* XPSailingRankView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingRankView.m; sourceTree = "<group>"; };
E8751E6428A6465A0056EF44 /* XPSailingRankSubView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingRankSubView.h; sourceTree = "<group>"; };
E8751E6528A6465A0056EF44 /* XPSailingRankSubView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingRankSubView.m; sourceTree = "<group>"; };
E8751E6928A64C6E0056EF44 /* XPSailingRankTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingRankTableViewCell.h; sourceTree = "<group>"; };
E8751E6A28A64C6E0056EF44 /* XPSailingRankTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingRankTableViewCell.m; sourceTree = "<group>"; };
E8751E6C28A64F990056EF44 /* XPSailingEmptyTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingEmptyTableViewCell.h; sourceTree = "<group>"; };
E8751E6D28A64F990056EF44 /* XPSailingEmptyTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingEmptyTableViewCell.m; sourceTree = "<group>"; };
E8751E6F28A6541B0056EF44 /* RoomSailingRankModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomSailingRankModel.h; sourceTree = "<group>"; };
E8751E7028A6541B0056EF44 /* RoomSailingRankModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomSailingRankModel.m; sourceTree = "<group>"; };
E8751E7228A665BC0056EF44 /* RoomSailingInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomSailingInfoModel.h; sourceTree = "<group>"; };
E8751E7328A665BC0056EF44 /* RoomSailingInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomSailingInfoModel.m; sourceTree = "<group>"; };
E875FA8527D619820086ED04 /* ClientDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ClientDataModel.h; sourceTree = "<group>"; };
E875FA8627D619820086ED04 /* ClientDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ClientDataModel.m; sourceTree = "<group>"; };
E877A7E92783E24700EFACED /* DatingStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DatingStageView.h; sourceTree = "<group>"; };
@@ -5345,6 +5373,88 @@
path = Model;
sourceTree = "<group>";
};
E8751E5128A629EB0056EF44 /* Sailing */ = {
isa = PBXGroup;
children = (
E8751E5628A62A250056EF44 /* Model */,
E8751E5528A62A1D0056EF44 /* Api */,
E8751E5428A62A150056EF44 /* View */,
E8751E5328A62A0E0056EF44 /* Presenter */,
E8751E5228A62A010056EF44 /* Protocol */,
);
path = Sailing;
sourceTree = "<group>";
};
E8751E5228A62A010056EF44 /* Protocol */ = {
isa = PBXGroup;
children = (
E8751E6028A62AA60056EF44 /* XPSailingProtocol.h */,
);
path = Protocol;
sourceTree = "<group>";
};
E8751E5328A62A0E0056EF44 /* Presenter */ = {
isa = PBXGroup;
children = (
E8751E5D28A62A970056EF44 /* XPSailingPresenter.h */,
E8751E5E28A62A970056EF44 /* XPSailingPresenter.m */,
);
path = Presenter;
sourceTree = "<group>";
};
E8751E5428A62A150056EF44 /* View */ = {
isa = PBXGroup;
children = (
E8751E6828A64C550056EF44 /* Cell */,
E8751E6728A64C480056EF44 /* SubViews */,
E8751E5A28A62A530056EF44 /* XPSailingViewController.h */,
E8751E5B28A62A530056EF44 /* XPSailingViewController.m */,
E8751E6128A646400056EF44 /* XPSailingRankView.h */,
E8751E6228A646400056EF44 /* XPSailingRankView.m */,
E8751E6428A6465A0056EF44 /* XPSailingRankSubView.h */,
E8751E6528A6465A0056EF44 /* XPSailingRankSubView.m */,
);
path = View;
sourceTree = "<group>";
};
E8751E5528A62A1D0056EF44 /* Api */ = {
isa = PBXGroup;
children = (
E8751E5728A62A390056EF44 /* Api+Sailing.h */,
E8751E5828A62A390056EF44 /* Api+Sailing.m */,
);
path = Api;
sourceTree = "<group>";
};
E8751E5628A62A250056EF44 /* Model */ = {
isa = PBXGroup;
children = (
E8751E6F28A6541B0056EF44 /* RoomSailingRankModel.h */,
E8751E7028A6541B0056EF44 /* RoomSailingRankModel.m */,
E8751E7228A665BC0056EF44 /* RoomSailingInfoModel.h */,
E8751E7328A665BC0056EF44 /* RoomSailingInfoModel.m */,
);
path = Model;
sourceTree = "<group>";
};
E8751E6728A64C480056EF44 /* SubViews */ = {
isa = PBXGroup;
children = (
);
path = SubViews;
sourceTree = "<group>";
};
E8751E6828A64C550056EF44 /* Cell */ = {
isa = PBXGroup;
children = (
E8751E6928A64C6E0056EF44 /* XPSailingRankTableViewCell.h */,
E8751E6A28A64C6E0056EF44 /* XPSailingRankTableViewCell.m */,
E8751E6C28A64F990056EF44 /* XPSailingEmptyTableViewCell.h */,
E8751E6D28A64F990056EF44 /* XPSailingEmptyTableViewCell.m */,
);
path = Cell;
sourceTree = "<group>";
};
E8788931273A53B000BF1D57 /* SendGiftView */ = {
isa = PBXGroup;
children = (
@@ -6045,6 +6155,7 @@
E8AEAED8271413530017FCE0 /* View */ = {
isa = PBXGroup;
children = (
E8751E5128A629EB0056EF44 /* Sailing */,
9BFE0D8F289903F600F53C24 /* TaskTip */,
9B9BBF80288FBF93004E2E74 /* NewUserGift */,
9B7D904A287BC4FC0033A45E /* AnchorCycleView */,
@@ -7438,6 +7549,7 @@
files = (
9BE01ADA289296B500B50299 /* XPDressUpShopPresenter.m in Sources */,
E8E5E1AF27C3920100F457D8 /* XPHomeRecommendPresenter.m in Sources */,
E8751E6628A6465A0056EF44 /* XPSailingRankSubView.m in Sources */,
E86B911E2810351A0007DEE7 /* MessageToolMenuCollectionViewCell.m in Sources */,
9B2EA7C32804052E00ED17BF /* AnchorPKMicroView.m in Sources */,
181D7F1B2726CE2A00B7C059 /* StageView.m in Sources */,
@@ -7480,6 +7592,7 @@
E87C0AA027D9DE6400CB2241 /* RoomFaceSendInfoModel.m in Sources */,
E88B5CB226FB1CFF00DA9178 /* XPMineTeenagerProtocol.h in Sources */,
E8E859C928264C2300EE4857 /* HTTPConnection.m in Sources */,
E8751E6328A646400056EF44 /* XPSailingRankView.m in Sources */,
9BD9A18027A0EFC7004186FE /* XPMineVisitorTableViewCell.m in Sources */,
9BD2ECD2288F833B00F5CD9A /* XPMineFootPrintModel.m in Sources */,
E824546626F5FF6000BE8163 /* XPMineResetPayPasswordProtocol.h in Sources */,
@@ -7512,6 +7625,7 @@
E8664ED327E4258A000171BA /* RoomPKTimeItemModel.m in Sources */,
E8412FA22779BE8F006E1101 /* XPRoomSettingViewController.m in Sources */,
E89D60BD271D647A001F8895 /* XPRoomPresenter.m in Sources */,
E8751E5C28A62A530056EF44 /* XPSailingViewController.m in Sources */,
9B7D904D287BC5E20033A45E /* AnchorRoomScrollView.m in Sources */,
E80DE4072775665000BE5BCB /* XPFirstRechargeCollectionViewCell.m in Sources */,
E8899C822785A694007944BE /* DatingInfoModel.m in Sources */,
@@ -7529,6 +7643,7 @@
E81366F826F0C12A0076364C /* LoginFullInfoProtocol.h in Sources */,
9BBC028E2786FA060007C24B /* NobleCardModel.m in Sources */,
E8E70D7E26F2F19D00F03460 /* Api+Mine.m in Sources */,
E8751E6E28A64F990056EF44 /* XPSailingEmptyTableViewCell.m in Sources */,
9B4D148127E485EB000AA0C1 /* XPRoomTrumpetView.m in Sources */,
E8E5E19427C36BA600F457D8 /* XPHomeBannerTableViewCell.m in Sources */,
9BD9A18727A120FD004186FE /* XPMineVisitorUnReadModel.m in Sources */,
@@ -7884,6 +7999,7 @@
9B1FC3D827E49C36006EFFE0 /* XPMineDressBubbleCollectionViewCell.m in Sources */,
9BE01AEA2893CB4400B50299 /* XPDressSearchViewController.m in Sources */,
9B5BF8A827E1BED1005DD346 /* Api+RoomTrumpet.m in Sources */,
E8751E6B28A64C6E0056EF44 /* XPSailingRankTableViewCell.m in Sources */,
9B1B72B528003664003FACE9 /* Api+AnchorPk.m in Sources */,
E8EEB90626FC5772007C6EBA /* XPMineUserInfoEditViewController.m in Sources */,
E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */,
@@ -7901,6 +8017,7 @@
E896EF942771AAC100AD2CC1 /* XPMineFansPresenter.m in Sources */,
E8A86E0627BA38DB001C21F9 /* UIColor+RW.m in Sources */,
E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */,
E8751E5F28A62A970056EF44 /* XPSailingPresenter.m in Sources */,
E8DAC5AC2858305A00012CFD /* XPRoomMessageBubbleView.m in Sources */,
E8A6C29F27CF5FE500AC7442 /* HomeLiveRoomModel.m in Sources */,
E84150B827747B8B00A7F548 /* XPFirstRechargeViewController.m in Sources */,
@@ -7957,6 +8074,7 @@
E8E70D8C26F2F5A500F03460 /* XPMineHeadItemCollectionViewCell.m in Sources */,
E883E82E28153BDF0000005D /* XPGuildAnchorIncomeSectionView.m in Sources */,
9B17F71827BD150600440843 /* SVGAParserManager.m in Sources */,
E8751E5928A62A390056EF44 /* Api+Sailing.m in Sources */,
E80DE40D2775ABA500BE5BCB /* XPFirstRechargeFlowLayout.m in Sources */,
9B39C88928854AB300564D17 /* XPHomeLiveRecordCell.m in Sources */,
9BE01AE128937DBC00B50299 /* XPDressUpShopCardViewController.m in Sources */,
@@ -7995,6 +8113,7 @@
9B1EF3D227E81C0600554295 /* XPMineDressUpBubbleViewController.m in Sources */,
E8A1E4512762082A00B294CA /* Api+CandyTree.m in Sources */,
E839533C276A0CCD00CF2F24 /* XPMineCarTableViewCell.m in Sources */,
E8751E7128A6541B0056EF44 /* RoomSailingRankModel.m in Sources */,
E8E859D928264C2300EE4857 /* DDFileLogger.m in Sources */,
E8EEB8FE26FC2DF8007C6EBA /* XPMineUserInfoCustomNavView.m in Sources */,
E839532A276A002800CF2F24 /* XPMineDressUpViewController.m in Sources */,
@@ -8154,6 +8273,7 @@
E896EFA92771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m in Sources */,
E8F1559328129EBA00EE8C06 /* ContentSecretaryModel.m in Sources */,
9BBC02912786FC570007C24B /* XPMineNobleCardTableViewCell.m in Sources */,
E8751E7428A665BC0056EF44 /* RoomSailingInfoModel.m in Sources */,
9B3353BB2881527A00AC2F24 /* XPHomeLivesViewController.m in Sources */,
E8F9168727EC927C00F10D8F /* XPHomeLittleGamePesenter.m in Sources */,
E8AC722126F47E23007D6E91 /* XPMineAboutUsViewController.m in Sources */,

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_add@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_add@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_description@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_description@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_explore@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_explore@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_explore_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_explore_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_getfule@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_getfule@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_rank@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_rank@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_rank_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_rank_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_record@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_record@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_redu@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_redu@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_sailing_rule_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_sailing_rule_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -70,6 +70,12 @@ typedef NS_ENUM(NSUInteger, URLType) {
kLicenseHourRankURL,
///幸运礼物玩法说明
kLuckyGiftPlayRuleURL,
///航海中奖记录
kSailingRecordURL,
///航海玩法说明
kSailingPlayDescdURL,
///活动地址
kSailingActivityURL
};
NSString * const URLWithType(URLType type);

View File

@@ -47,6 +47,9 @@ NSString * const URLWithType(URLType type) {
@(kNewWeekStarURL) : @"modules/weekStar/newWeekStar.html", ///-
@(kLicenseHourRankURL) : @"modules/room_rank/hourRankLicense.html",///
@(kLuckyGiftPlayRuleURL) : @"modules/rule/luckyGiftRule.html?giftID=%@",///
@(kSailingActivityURL) : @"activity/radish/index.html", ///
@(kSailingPlayDescdURL) : @"modules/rule/radishRule.html", ///
@(kSailingRecordURL) : @"modules/rank/index.html#/RadishRecord", ///
};
NSString * url = [dic objectForKey:@(type)];

View File

@@ -30,6 +30,7 @@
#import "XPFirstRechargeViewController.h"
#import "XPFirstRechargeSuccessView.h"
#import "XPArrangeMicViewController.h"
#import "XPSailingViewController.h"
@interface XPRoomActivityContainerView ()<SDCycleScrollViewDelegate>
///
@@ -50,6 +51,8 @@
@property (nonatomic,copy) NSMutableArray<ActivityInfoModel *> *activityList;
///
@property (nonatomic,strong) NSMutableArray<NSString *> *imageUrlList;
///
@property (nonatomic,strong) UIImageView *sailingImageView;
///
@property (nonatomic,assign) BOOL isLoadActivity;
@end
@@ -72,6 +75,7 @@
- (void)initSubViews {
[self addSubview:self.stackView];
[self.stackView addArrangedSubview:self.cycleScrollView];
[self.stackView addArrangedSubview:self.sailingImageView];
[self.stackView addArrangedSubview:self.placeHolderView];
[self.stackView addArrangedSubview:self.firstRechargeImageView];
[self.stackView addArrangedSubview:self.candyTreeImageView];
@@ -86,6 +90,10 @@
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(65, 65));
}];
[self.sailingImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(65, 65));
}];
[self.firstRechargeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(65, 65));
@@ -383,6 +391,12 @@
}];
}
- (void)sailTapRecognizer {
XPSailingViewController * sailingVC = [[XPSailingViewController alloc] init];
sailingVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
[self.hostDelegate.getCurrentNav presentViewController:sailingVC animated:YES completion:nil];
}
#pragma mark - Getters And Setters
- (SDCycleScrollView *)cycleScrollView {
if (!_cycleScrollView) {
@@ -468,5 +482,16 @@
return _activityList;
}
- (UIImageView *)sailingImageView {
if (!_sailingImageView) {
_sailingImageView = [[UIImageView alloc] init];
_sailingImageView.image = [UIImage imageNamed:@"room_first_recharge_enter"];
_sailingImageView.userInteractionEnabled = YES;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(sailTapRecognizer)];
[_sailingImageView addGestureRecognizer:tap];
}
return _sailingImageView;
}
@end

View File

@@ -0,0 +1,26 @@
//
// Api+Sailing.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import "Api.h"
NS_ASSUME_NONNULL_BEGIN
@interface Api (Sailing)
/// 获取航海排行榜列表
/// @param compltion 完成
/// @param page 当前的页数
/// @param pageSize 一个多少个
/// @param datetype 类型 今日榜1 昨日榜2
+ (void)getSailingRankList:(HttpRequestHelperCompletion)compltion page:(NSString *)page pageSize:(NSString *)pageSize datetype:(NSString *)datetype;
/// 获取航海的燃料
/// @param completion 完成
/// @param uid 用户的uid
+ (void)getSailingInfo:(HttpRequestHelperCompletion)completion uid:(NSString *)uid;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,30 @@
//
// Api+Sailing.m
// xplan-ios
//
// Created by on 2022/8/12.
//
#import "Api+Sailing.h"
@implementation Api (Sailing)
///
/// @param compltion
/// @param page
/// @param pageSize
/// @param datetype 1 2
+ (void)getSailingRankList:(HttpRequestHelperCompletion)compltion page:(NSString *)page pageSize:(NSString *)pageSize datetype:(NSString *)datetype {
[self makeRequest:@"linearlyPool/rankings" method:HttpRequestHelperMethodGET completion:compltion, __FUNCTION__, page, pageSize, datetype, nil];
}
///
/// @param completion
/// @param uid uid
+ (void)getSailingInfo:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
[self makeRequest:@"linearlyPool/userkey" method:HttpRequestHelperMethodGET completion:completion, uid, nil];
}
@end

View File

@@ -0,0 +1,17 @@
//
// RoomSailingInfoModel.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface RoomSailingInfoModel : NSObject
///燃料的个数
@property (nonatomic, assign) int keyNum;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// RoomSailingInfoModel.m
// xplan-ios
//
// Created by on 2022/8/12.
//
#import "RoomSailingInfoModel.h"
@implementation RoomSailingInfoModel
@end

View File

@@ -0,0 +1,24 @@
//
// RoomSailingRankModel.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import <Foundation/Foundation.h>
#import "XPEnum.h"
NS_ASSUME_NONNULL_BEGIN
@interface RoomSailingRankModel : NSObject
@property (copy, nonatomic) NSString * uid;
@property (copy, nonatomic) NSString *nick;
@property (copy, nonatomic) NSString *avatar; //头像
@property (nonatomic,strong) NSString *badge;//徽章
@property (nonatomic,strong) NSString *micDecorate;//头饰
@property (copy, nonatomic) NSString *goldAmount;//房间send/receive钻石总数
@property (strong, nonatomic) NSNumber *amount;//房间许愿池排行榜钻石
@property (copy, nonatomic) NSString *ranking;//排名
@property (nonatomic,assign) BOOL hide;//是否榜单隐身
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// RoomSailingRankModel.m
// xplan-ios
//
// Created by on 2022/8/12.
//
#import "RoomSailingRankModel.h"
@implementation RoomSailingRankModel
@end

View File

@@ -0,0 +1,16 @@
//
// XPSailingPresenter.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import "BaseMvpPresenter.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPSailingPresenter : BaseMvpPresenter
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// XPSailingPresenter.m
// xplan-ios
//
// Created by on 2022/8/12.
//
#import "XPSailingPresenter.h"
@implementation XPSailingPresenter
@end

View File

@@ -0,0 +1,16 @@
//
// XPSailingProtocol.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol XPSailingProtocol <NSObject>
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,16 @@
//
// XPSailingEmptyTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPSailingEmptyTableViewCell : UITableViewCell
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,73 @@
//
// XPSailingEmptyTableViewCell.m
// xplan-ios
//
// Created by on 2022/8/12.
//
#import "XPSailingEmptyTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "UIImageConstant.h"
@interface XPSailingEmptyTableViewCell ()
@property (nonatomic,strong) UIImageView *emptyImageView;
@property (nonatomic,strong) UILabel *titleLabel;
@end
@implementation XPSailingEmptyTableViewCell
- (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.backgroundColor = [UIColor clearColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.emptyImageView];
[self.contentView addSubview:self.titleLabel];
}
- (void)initSubViewConstraints {
[self.emptyImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.contentView);
make.top.mas_equalTo(self.contentView).offset(50);
make.size.mas_equalTo(CGSizeMake(100, 100));
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.emptyImageView.mas_bottom).offset(20);
make.left.right.mas_equalTo(self.contentView);
}];
}
#pragma mark - Getters And Setters
- (UIImageView *)emptyImageView {
if (!_emptyImageView) {
_emptyImageView = [[UIImageView alloc] init];
_emptyImageView.userInteractionEnabled = YES;
_emptyImageView.image = [UIImageConstant defalutEmptyPlaceholder];
_emptyImageView.layer.masksToBounds = YES;
_emptyImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _emptyImageView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.text = @"暂无数据";
_titleLabel.font = [UIFont systemFontOfSize:16];
_titleLabel.textAlignment = NSTextAlignmentCenter;
_titleLabel.textColor = [ThemeColor secondTextColor];
}
return _titleLabel;
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPSailingRankTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPSailingRankTableViewCell : UITableViewCell
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,153 @@
//
// XPSailingRankTableViewCell.m
// xplan-ios
//
// Created by on 2022/8/12.
//
#import "XPSailingRankTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "NetImageView.h"
@interface XPSailingRankTableViewCell ()
///
@property (nonatomic,strong) UIView * backView;
///
@property (nonatomic,strong) UIButton *rankButton;
///
@property (nonatomic,strong) NetImageView *avatarImageView;
///
@property (nonatomic,strong) UILabel *nickLabel;
///
@property (nonatomic,strong) UILabel *coinLabel;
///
@property (nonatomic,strong) UIImageView *diamondImageView;
@end
@implementation XPSailingRankTableViewCell
- (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.backgroundColor = [UIColor clearColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.backView];
[self.backView addSubview:self.rankButton];
[self.backView addSubview:self.avatarImageView];
[self.backView addSubview:self.nickLabel];
[self.backView addSubview:self.diamondImageView];
[self.backView addSubview:self.coinLabel];
}
- (void)initSubViewConstraints {
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.contentView).inset(15);
make.top.mas_equalTo(self.contentView);
make.height.mas_equalTo(60);
}];
[self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(29, 20));
make.left.mas_equalTo(self.backView).offset(15);
make.centerY.mas_equalTo(self.backView);
}];
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(50, 50));
make.centerY.mas_equalTo(self.backView);
make.left.mas_equalTo(self.rankButton.mas_right).offset(24);
}];
[self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.avatarImageView.mas_right);
make.centerY.mas_equalTo(self.nickLabel);
make.right.mas_lessThanOrEqualTo(self.diamondImageView.mas_left).offset(-5);
}];
[self.diamondImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(14, 12));
make.centerY.mas_equalTo(self.backView);
make.right.mas_equalTo(self.coinLabel.mas_left).offset(-2);
}];
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.backView).offset(-10);
make.centerY.mas_equalTo(self.backView);
}];
}
#pragma mark - Getters And Setters
- (UIView *)backView {
if (!_backView) {
_backView = [[UIView alloc] init];
_backView.backgroundColor = [ThemeColor colorWithHexString:@"#F9F0D9"];
_backView.layer.masksToBounds = YES;
_backView.layer.cornerRadius = 6;
}
return _backView;
}
- (UIButton *)rankButton {
if (!_rankButton) {
_rankButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_rankButton setTitle:@"1" forState:UIControlStateNormal];
[_rankButton setTitleColor:[ThemeColor colorWithHexString:@"#CFAD79"] forState:UIControlStateNormal];
_rankButton.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
}
return _rankButton;
}
- (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 = 50/2;
}
return _avatarImageView;
}
- (UILabel *)nickLabel {
if (!_nickLabel) {
_nickLabel = [[UILabel alloc] init];
_nickLabel.font = [UIFont systemFontOfSize:12];
_nickLabel.textColor = [ThemeColor colorWithHexString:@"#A08161"];
}
return _nickLabel;
}
- (UIImageView *)diamondImageView {
if (!_diamondImageView) {
_diamondImageView = [[UIImageView alloc] init];
_diamondImageView.userInteractionEnabled = YES;
_diamondImageView.image = [UIImage imageNamed:@"common_diamond"];
}
return _diamondImageView;
}
- (UILabel *)coinLabel {
if (!_coinLabel) {
_coinLabel = [[UILabel alloc] init];
_coinLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
_coinLabel.textColor = [ThemeColor colorWithHexString:@"#64472E"];
}
return _coinLabel;
}
@end

View File

@@ -0,0 +1,21 @@
//
// XPSailingRankSubView.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import <UIKit/UIKit.h>
#import <JXCategoryView/JXCategoryListContainerView.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, SailingRankType) {
SailingRankType_Today = 1,
SailingRankType_YesterDay = 2
};
@interface XPSailingRankSubView : UIView<JXCategoryListContentViewDelegate>
@property (nonatomic,assign) SailingRankType type;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,175 @@
//
// XPSailingRankSubView.m
// xplan-ios
//
// Created by on 2022/8/12.
//
#import "XPSailingRankSubView.h"
///Third
#import <Masonry/Masonry.h>
#import <MJRefresh/MJRefresh.h>
///Tool
#import "ThemeColor.h"
#import "Api+Sailing.h"
#import "XCHUDTool.h"
///Model
#import "RoomSailingRankModel.h"
///View
#import "XPSailingEmptyTableViewCell.h"
#import "XPSailingRankTableViewCell.h"
@interface XPSailingRankSubView ()<UITableViewDelegate, UITableViewDataSource>
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) NSMutableArray *datasource;
@property (nonatomic,assign) int page;
@property (nonatomic,assign) BOOL hasNoMoreData;
@end
@implementation XPSailingRankSubView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initHeaderAndFooterRrfresh];
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
- (void)initHeaderAndFooterRrfresh {
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)];
header.stateLabel.font = [UIFont systemFontOfSize:10.0];
header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0];
header.stateLabel.textColor = [ThemeColor secondTextColor];
header.lastUpdatedTimeLabel.textColor = [ThemeColor secondTextColor];
self.tableView.mj_header = header;
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
footer.stateLabel.textColor = [ThemeColor secondTextColor];
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
self.tableView.mj_footer = footer;
}
#pragma mark - fangfa
- (void)headerRefresh {
self.page = 1;
NSString * page = [NSString stringWithFormat:@"%d", self.page];
NSString * type = [NSString stringWithFormat:@"%ld", self.type];
[Api getSailingRankList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[self.tableView.mj_header endRefreshing];
if (code == 200) {
[self.datasource removeAllObjects];
NSArray * array = [RoomSailingRankModel modelsWithArray:data.data[@"rankVos"]];
[self.datasource addObjectsFromArray:array];
self.hasNoMoreData = NO;
[self.tableView reloadData];
} else {
[XCHUDTool showErrorWithMessage:msg];
}
} page:page pageSize:@"20" datetype:type];
}
- (void)footerRefresh {
if (self.hasNoMoreData) {
[XCHUDTool showErrorWithMessage:@"没有更多房间了"];
[self.tableView.mj_footer endRefreshing];
return;
}
self.page++;
NSString * page = [NSString stringWithFormat:@"%d", self.page];
NSString * type = [NSString stringWithFormat:@"%ld", self.type];
[Api getSailingRankList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[self.tableView.mj_footer endRefreshing];
if (code == 200) {
NSArray * array = [RoomSailingRankModel modelsWithArray:data.data[@"rankVos"]];
if (array.count > 0) {
[self.datasource addObjectsFromArray:array];
self.hasNoMoreData = NO;
} else {
self.hasNoMoreData= YES;
}
[self.tableView reloadData];
} else {
[XCHUDTool showErrorWithMessage:msg];
}
} page:page pageSize:@"20" datetype:type];
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.tableView];
}
- (void)initSubViewConstraints {
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self);
}];
}
#pragma mark - UITableViewDelegate And UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.datasource.count > 0 ? self.datasource.count : 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return self.datasource.count > 0 ? 74 : 380;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.datasource.count > 0 ) {
XPSailingRankTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPSailingRankTableViewCell class])];
if (cell == nil) {
cell = [[XPSailingRankTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSailingRankTableViewCell class])];
}
return cell;
}
XPSailingEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPSailingEmptyTableViewCell class])];
if (cell == nil) {
cell = [[XPSailingEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSailingEmptyTableViewCell class])];
}
return cell;
}
#pragma mark - JXCategoryListContentViewDelegate
- (UIView *)listView {
return self;
}
- (void)setType:(SailingRankType)type {
_type = type;
[self headerRefresh];
}
- (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];
if (@available(iOS 11.0, *)) {
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
[_tableView registerClass:[XPSailingEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPSailingEmptyTableViewCell class])];
[_tableView registerClass:[XPSailingRankTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPSailingRankTableViewCell class])];
}
return _tableView;
}
- (NSMutableArray *)datasource {
if (!_datasource) {
_datasource = [NSMutableArray array];
}
return _datasource;
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPSailingRankView.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPSailingRankView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,154 @@
//
// XPSailingRankView.m
// xplan-ios
//
// Created by on 2022/8/12.
//
#import "XPSailingRankView.h"
///Third
#import <Masonry/Masonry.h>
#import <JXCategoryView/JXCategoryView.h>
#import <JXCategoryView/JXCategoryIndicatorBackgroundView.h>
#import <JXCategoryView/JXCategoryListContainerView.h>
///Tool
#import "ThemeColor.h"
#import "XPMacro.h"
///View
#import "XPSailingRankSubView.h"
@interface XPSailingRankView ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate>
///
@property (nonatomic, strong) NSArray<NSString *> *titles;
///
@property (nonatomic, strong) JXCategoryTitleView *titleView;
///lineView
@property (nonatomic, strong) JXCategoryListContainerView *contentView;
///
@property (nonatomic,strong) UIImageView *backImageView;
///
@property (nonatomic,strong) XPSailingRankSubView *todayView;
///
@property (nonatomic,strong) XPSailingRankSubView *yesterdayView;
@end
@implementation XPSailingRankView
- (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.backImageView];
[self addSubview:self.titleView];
[self addSubview:self.contentView];
}
- (void)initSubViewConstraints {
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(KScreenWidth, 515));
}];
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self);
}];
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self);
make.top.mas_equalTo(self).offset(98);
make.height.mas_equalTo(30);
}];
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self);
make.top.mas_equalTo(self.titleView.mas_bottom);
}];
}
#pragma mark - JXCategoryViewDelegate
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
return self.titles.count;
}
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
if (index == 0) {
return self.todayView;
} else {
return self.yesterdayView;
}
}
#pragma mark - Getters And Setters
- (JXCategoryTitleView *)titleView {
if (!_titleView) {
_titleView = [[JXCategoryTitleView alloc] init];
_titleView.delegate = self;
_titleView.titles = self.titles;
_titleView.backgroundColor = [UIColor clearColor];
_titleView.titleColor = [ThemeColor colorWithHexString:@"#825A3A"];
_titleView.titleSelectedColor = [ThemeColor colorWithHexString:@"#F4D398"];
_titleView.titleFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:12];
_titleView.titleSelectedFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:12];
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
_titleView.defaultSelectedIndex = 0;
_titleView.cellWidth = KScreenWidth/ 2;
_titleView.cellSpacing = 0;
_titleView.listContainer = self.contentView;
JXCategoryIndicatorLineView * indocator = [[JXCategoryIndicatorLineView alloc] init];
indocator.indicatorColor = [ThemeColor colorWithHexString:@"#F4D398"];
indocator.indicatorWidth = 12;
indocator.indicatorHeight = 4;
indocator.indicatorCornerRadius = 2;
indocator.lineScrollOffsetX = 4;
_titleView.indicators = @[indocator];
}
return _titleView;
}
- (JXCategoryListContainerView *)contentView {
if (!_contentView) {
_contentView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
_contentView.defaultSelectedIndex = 0;
}
return _contentView;
}
- (NSArray<NSString *> *)titles {
return @[@"今日榜单", @"昨日榜单"];
}
- (UIImageView *)backImageView {
if (!_backImageView) {
_backImageView = [[UIImageView alloc] init];
_backImageView.userInteractionEnabled = YES;
_backImageView.image = [UIImage imageNamed:@"room_sailing_rank_bg"];
}
return _backImageView;
}
- (XPSailingRankSubView *)todayView {
if (!_todayView) {
_todayView = [[XPSailingRankSubView alloc] init];
_todayView.type = SailingRankType_Today;
}
return _todayView;
}
- (XPSailingRankSubView *)yesterdayView {
if (!_yesterdayView) {
_yesterdayView = [[XPSailingRankSubView alloc] init];
_yesterdayView.type = SailingRankType_YesterDay;
}
return _yesterdayView;
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPSailingViewController.h
// xplan-ios
//
// Created by 冯硕 on 2022/8/12.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPSailingViewController : BaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,385 @@
//
// XPSailingViewController.m
// xplan-ios
//
// Created by on 2022/8/12.
//
#import "XPSailingViewController.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "XPMacro.h"
#import "TTPopup.h"
#import "XPHtmlUrl.h"
///View
#import "XPSailingRankView.h"
#import "XPRoomHalfWebView.h"
@interface XPSailingViewController ()
///View
@property (nonatomic,strong) UIView * topView;
///
@property (nonatomic,strong) UIImageView *backImageView;
///
@property (nonatomic,strong) UIButton *rankButton;
///h
@property (nonatomic,strong) UIButton *getFuleButton;
///
@property (nonatomic,strong) UIButton *recordButton;
///
@property (nonatomic,strong) UIImageView *contentImageView;
///
@property (nonatomic,strong) UIButton *descriptionButton;
///
@property (nonatomic,strong) UIButton *fuleButton;
///
@property (nonatomic,strong) UIStackView * numberView;
///
@property (nonatomic,strong) UIButton *addButton;
///
@property (nonatomic,strong) UIButton *reduButton;
///
@property (nonatomic,strong) UITextField *textField;
///
@property (nonatomic,strong) UIButton *exploreButton;
///
@property (nonatomic,strong) UILabel *consumLabel;
@property (nonatomic,assign) NSInteger exploreCount;
@end
@implementation XPSailingViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubViews];
[self initSubViewConstraints];
}
#pragma mark - Private Method
- (void)initSubViews {
self.exploreCount = 1;
self.view.backgroundColor = [UIColor clearColor];
[self.view addSubview:self.topView];
[self.view addSubview:self.backImageView];
[self.backImageView addSubview:self.rankButton];
[self.backImageView addSubview:self.getFuleButton];
[self.backImageView addSubview:self.recordButton];
[self.backImageView addSubview:self.contentImageView];
[self.contentImageView addSubview:self.descriptionButton];
[self.contentImageView addSubview:self.fuleButton];
[self.contentImageView addSubview:self.numberView];
[self.contentImageView addSubview:self.exploreButton];
[self.contentImageView addSubview:self.consumLabel];
[self.numberView addArrangedSubview:self.reduButton];
[self.numberView addArrangedSubview:self.textField];
[self.numberView addArrangedSubview:self.addButton];
}
- (void)initSubViewConstraints {
[self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self.view);
make.bottom.mas_equalTo(self.backImageView.mas_top);
}];
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self.view);
make.height.mas_equalTo(515);
}];
[self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(41, 32));
make.top.mas_equalTo(self.backImageView).offset(129);
make.right.mas_equalTo(self.backImageView).offset(-12);
}];
[self.getFuleButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.right.mas_equalTo(self.rankButton);
make.top.mas_equalTo(self.rankButton.mas_bottom).offset(8);
}];
[self.recordButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.right.mas_equalTo(self.rankButton);
make.top.mas_equalTo(self.getFuleButton.mas_bottom).offset(8);
}];
CGFloat kscale = 199.0f / 356.0f;
[self.contentImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.backImageView).inset(9);
make.bottom.mas_equalTo(self.backImageView).offset(-34);
make.height.mas_equalTo((KScreenWidth - 18) * kscale);
}];
[self.descriptionButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(65, 22));
make.right.mas_equalTo(self.contentImageView);
make.top.mas_equalTo(self.contentImageView).offset(42);
}];
[self.fuleButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.right.mas_equalTo(self.descriptionButton);
make.top.mas_equalTo(self.descriptionButton.mas_bottom).offset(4);
}];
[self.numberView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.contentImageView);
make.top.mas_equalTo(self.contentImageView).offset(77);
make.height.mas_equalTo(30);
}];
[self.reduButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(27);
make.height.mas_equalTo(27);
}];
[self.addButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(27);
make.height.mas_equalTo(27);
}];
[self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(75);
make.height.mas_equalTo(30);
}];
[self.exploreButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(150, 47));
make.centerX.mas_equalTo(self.contentImageView);
make.top.mas_equalTo(self.numberView.mas_bottom).offset(12);
}];
[self.consumLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.contentImageView);
make.top.mas_equalTo(self.exploreButton.mas_bottom).offset(1);
}];
}
#pragma mark - Event Response
- (void)dismissView {
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)rankButtonAction:(UIButton *)sender {
XPSailingRankView * rankView = [[XPSailingRankView alloc] init];
[TTPopup popupView:rankView style:TTPopupStyleActionSheet];
}
- (void)getFuleButtonAction:(UIButton *)sender {
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
webView.url = URLWithType(kSailingActivityURL);
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
}
- (void)recordButtonAction:(UIButton *)sender {
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
webView.url = URLWithType(kSailingRecordURL);
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
}
- (void)descriptionButtonAction:(UIButton *)sender {
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
webView.url = URLWithType(kSailingPlayDescdURL);
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
}
- (void)addButtonAction:(UIButton *)sender {
self.exploreCount ++;
self.textField.text= [NSString stringWithFormat:@"%ld", self.exploreCount];
}
- (void)reduButtonAction:(UIButton *)sender {
self.exploreCount --;
self.textField.text= [NSString stringWithFormat:@"%ld", self.exploreCount];
}
- (void)exploreButtonAction:(UIButton *)sender {
}
- (void)textFiledDidChange:(UITextField *)textFiled {
if (textFiled.text.integerValue <= 0) {
textFiled.text = @"1";
self.exploreCount = 1;
}
if (textFiled.text.integerValue > 200) {
textFiled.text = @"200";
self.exploreCount = 200;
[self showErrorToast:@"一次性最多只能探索200次"];
}
self.exploreCount = textFiled.text.integerValue;
}
#pragma mark - Getters And Setters
- (void)setExploreCount:(NSInteger)exploreCount {
_exploreCount = exploreCount;
if (_exploreCount == 1) {
self.reduButton.enabled = NO;
} else {
self.reduButton.enabled = YES;
}
if (_exploreCount == 200) {
self.addButton.enabled = NO;
} else {
self.addButton.enabled = YES;
}
}
- (UIView *)topView {
if (!_topView) {
_topView = [[UIView alloc] init];
_topView.backgroundColor = [UIColor clearColor];
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissView)];
[_topView addGestureRecognizer:tap];
return _topView;
}
return _topView;
}
- (UIImageView *)backImageView {
if (!_backImageView) {
_backImageView = [[UIImageView alloc] init];
_backImageView.userInteractionEnabled = YES;
_backImageView.image = [UIImage imageNamed:@"room_sailing_bg"];
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
_backImageView.layer.masksToBounds = YES;
}
return _backImageView;
}
- (UIButton *)rankButton {
if (!_rankButton) {
_rankButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_rankButton setImage:[UIImage imageNamed:@"room_sailing_rank"] forState:UIControlStateNormal];
[_rankButton setImage:[UIImage imageNamed:@"room_sailing_rank"] forState:UIControlStateSelected];
[_rankButton addTarget:self action:@selector(rankButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _rankButton;
}
- (UIButton *)getFuleButton {
if (!_getFuleButton) {
_getFuleButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_getFuleButton setImage:[UIImage imageNamed:@"room_sailing_getfule"] forState:UIControlStateNormal];
[_getFuleButton setImage:[UIImage imageNamed:@"room_sailing_getfule"] forState:UIControlStateSelected];
[_getFuleButton addTarget:self action:@selector(getFuleButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _getFuleButton;
}
- (UIButton *)recordButton {
if (!_recordButton) {
_recordButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_recordButton setImage:[UIImage imageNamed:@"room_sailing_record"] forState:UIControlStateNormal];
[_recordButton setImage:[UIImage imageNamed:@"room_sailing_record"] forState:UIControlStateSelected];
[_recordButton addTarget:self action:@selector(recordButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _recordButton;
}
- (UIImageView *)contentImageView {
if (!_contentImageView) {
_contentImageView = [[UIImageView alloc] init];
_contentImageView.userInteractionEnabled = YES;
_contentImageView.image = [UIImage imageNamed:@"room_sailing_explore_bg"];
}
return _contentImageView;
}
- (UIButton *)descriptionButton {
if (!_descriptionButton) {
_descriptionButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_descriptionButton setImage:[UIImage imageNamed:@"room_sailing_description"] forState:UIControlStateNormal];
[_descriptionButton setImage:[UIImage imageNamed:@"room_sailing_description"] forState:UIControlStateSelected];
[_descriptionButton addTarget:self action:@selector(descriptionButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _descriptionButton;
}
- (UIButton *)fuleButton {
if (!_fuleButton) {
_fuleButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_fuleButton setTitle:@"0" forState:UIControlStateNormal];
[_fuleButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_fuleButton.titleLabel.font = [UIFont systemFontOfSize:10];
[_fuleButton setTitleColor:[ThemeColor colorWithHexString:@"#643B29"] forState:UIControlStateNormal];
[_fuleButton setBackgroundImage:[UIImage imageNamed:@"room_sailing_rule_bg"] forState:UIControlStateNormal];
}
return _fuleButton;
}
- (UIStackView *)numberView {
if (!_numberView) {
_numberView = [[UIStackView alloc] init];
_numberView.axis = UILayoutConstraintAxisHorizontal;
_numberView.distribution = UIStackViewDistributionFill;
_numberView.alignment = UIStackViewAlignmentCenter;
_numberView.spacing = 6;
}
return _numberView;
}
- (UITextField *)textField {
if (!_textField) {
_textField = [[UITextField alloc] init];
_textField.textColor = [ThemeColor colorWithHexString:@"#64472E"];
_textField.backgroundColor = [ThemeColor colorWithHexString:@"#DACBB4"];
_textField.font = [UIFont systemFontOfSize:15];
_textField.layer.masksToBounds = YES;
_textField.layer.cornerRadius = 11;
_textField.text = @"1";
_textField.textAlignment = NSTextAlignmentCenter;
[_textField addTarget:self action:@selector(textFiledDidChange:) forControlEvents:UIControlEventEditingChanged];
_textField.keyboardType = UIKeyboardTypeNumberPad;
}
return _textField;
}
- (UIButton *)addButton {
if (!_addButton) {
_addButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_addButton setImage:[UIImage imageNamed:@"room_sailing_add"] forState:UIControlStateNormal];
[_addButton setImage:[UIImage imageNamed:@"room_sailing_add"] forState:UIControlStateSelected];
[_addButton addTarget:self action:@selector(addButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _addButton;
}
- (UIButton *)reduButton {
if (!_reduButton) {
_reduButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_reduButton setImage:[UIImage imageNamed:@"room_sailing_redu"] forState:UIControlStateNormal];
[_reduButton setImage:[UIImage imageNamed:@"room_sailing_redu"] forState:UIControlStateSelected];
[_reduButton addTarget:self action:@selector(reduButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _reduButton;
}
- (UIButton *)exploreButton {
if (!_exploreButton) {
_exploreButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_exploreButton setImage:[UIImage imageNamed:@"room_sailing_explore"] forState:UIControlStateNormal];
[_exploreButton setImage:[UIImage imageNamed:@"room_sailing_explore"] forState:UIControlStateSelected];
[_exploreButton addTarget:self action:@selector(exploreButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _exploreButton;
}
- (UILabel *)consumLabel {
if (!_consumLabel) {
_consumLabel = [[UILabel alloc] init];
_consumLabel.font = [UIFont systemFontOfSize:10];
_consumLabel.textColor = [ThemeColor colorWithHexString:@"#A08161"];
_consumLabel.textAlignment = NSTextAlignmentCenter;
_consumLabel.text = @"消耗1燃油连续探索";
}
return _consumLabel;
}
@end