Commit e3ece8c5 authored by David黄金龙's avatar David黄金龙

删除 不使用的代码

parent e4c90cff
......@@ -297,7 +297,6 @@
A517A4E42BB6C4BB000DEECD /* YHDocumentUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4E22BB6C4BB000DEECD /* YHDocumentUploadView.swift */; };
A517A4E52BB6C4BB000DEECD /* YHDocumentFileItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4E32BB6C4BB000DEECD /* YHDocumentFileItemView.swift */; };
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; };
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */; };
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; };
A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */; };
A53D381E2BC23794006AE6F7 /* YHMsgViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53D381D2BC23794006AE6F7 /* YHMsgViewController.swift */; };
......@@ -379,26 +378,15 @@
A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */; };
A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */; };
A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9262B4564F7002C94D2 /* YHNoDataTipView.swift */; };
A5ACE95E2B4571BF002C94D2 /* YHHomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE95D2B4571BF002C94D2 /* YHHomeViewController.swift */; };
A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */; };
A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */; };
A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */; };
A5C382D12B5FAAB300C5E65C /* YHContactItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382D02B5FAAB300C5E65C /* YHContactItemModel.swift */; };
A5C5B2E62B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2E52B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift */; };
A5C5B2E82B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */; };
A5C5B2EA2B4ECA4D00A7C5D1 /* YHDavidModel0.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2E92B4ECA4D00A7C5D1 /* YHDavidModel0.swift */; };
A5C5B2EE2B4F9B8800A7C5D1 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = A5C5B2ED2B4F9B8800A7C5D1 /* Localizable.xcstrings */; };
A5C5B2FB2B5535DF00A7C5D1 /* YHHomeBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2FA2B5535DF00A7C5D1 /* YHHomeBannerView.swift */; };
A5C5B2FD2B55361700A7C5D1 /* YHBannerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2FC2B55361700A7C5D1 /* YHBannerModel.swift */; };
A5C5B3002B55623800A7C5D1 /* YHMainContentBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2FE2B55623700A7C5D1 /* YHMainContentBaseViewController.swift */; };
A5C5B3102B57677300A7C5D1 /* YHGestureTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B30F2B57677300A7C5D1 /* YHGestureTableView.swift */; };
A5C5B3122B57B47D00A7C5D1 /* YHDavidCell0.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3112B57B47D00A7C5D1 /* YHDavidCell0.swift */; };
A5C5B3232B57BF8F00A7C5D1 /* YHDavidCell1.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3222B57BF8F00A7C5D1 /* YHDavidCell1.swift */; };
A5C5B3252B57C74900A7C5D1 /* YHDavidCell3.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3242B57C74900A7C5D1 /* YHDavidCell3.swift */; };
A5C5B3272B57C8D500A7C5D1 /* YHDavidCell2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3262B57C8D500A7C5D1 /* YHDavidCell2.swift */; };
A5C5B3292B57CCBE00A7C5D1 /* YHDavidCell4.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3282B57CCBE00A7C5D1 /* YHDavidCell4.swift */; };
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */; };
A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */; };
A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */; };
A5D0012A2BABC84A001F003C /* YHFileListHeaerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */; };
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001292BABC84A001F003C /* YHFileListBottomView.swift */; };
......@@ -749,7 +737,6 @@
A517A4E22BB6C4BB000DEECD /* YHDocumentUploadView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDocumentUploadView.swift; sourceTree = "<group>"; };
A517A4E32BB6C4BB000DEECD /* YHDocumentFileItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDocumentFileItemView.swift; sourceTree = "<group>"; };
A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; };
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCustomCell.swift; sourceTree = "<group>"; };
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; };
A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocListHeaderView.swift; sourceTree = "<group>"; };
A53D381D2BC23794006AE6F7 /* YHMsgViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMsgViewController.swift; sourceTree = "<group>"; };
......@@ -835,26 +822,15 @@
A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBouncesContentView.swift; sourceTree = "<group>"; };
A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBasicContentView.swift; sourceTree = "<group>"; };
A5ACE9262B4564F7002C94D2 /* YHNoDataTipView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHNoDataTipView.swift; sourceTree = "<group>"; };
A5ACE95D2B4571BF002C94D2 /* YHHomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeViewController.swift; sourceTree = "<group>"; };
A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginTipsView.swift; sourceTree = "<group>"; };
A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractCell.swift; sourceTree = "<group>"; };
A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterMainViewModel.swift; sourceTree = "<group>"; };
A5C382D02B5FAAB300C5E65C /* YHContactItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContactItemModel.swift; sourceTree = "<group>"; };
A5C5B2E52B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDavidTestViewController.swift; sourceTree = "<group>"; };
A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDavidTestCollectionViewCell.swift; sourceTree = "<group>"; };
A5C5B2E92B4ECA4D00A7C5D1 /* YHDavidModel0.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDavidModel0.swift; sourceTree = "<group>"; };
A5C5B2ED2B4F9B8800A7C5D1 /* Localizable.xcstrings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
A5C5B2FA2B5535DF00A7C5D1 /* YHHomeBannerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeBannerView.swift; sourceTree = "<group>"; };
A5C5B2FC2B55361700A7C5D1 /* YHBannerModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBannerModel.swift; sourceTree = "<group>"; };
A5C5B2FE2B55623700A7C5D1 /* YHMainContentBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMainContentBaseViewController.swift; sourceTree = "<group>"; };
A5C5B30F2B57677300A7C5D1 /* YHGestureTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHGestureTableView.swift; sourceTree = "<group>"; };
A5C5B3112B57B47D00A7C5D1 /* YHDavidCell0.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDavidCell0.swift; sourceTree = "<group>"; };
A5C5B3222B57BF8F00A7C5D1 /* YHDavidCell1.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell1.swift; sourceTree = "<group>"; };
A5C5B3242B57C74900A7C5D1 /* YHDavidCell3.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell3.swift; sourceTree = "<group>"; };
A5C5B3262B57C8D500A7C5D1 /* YHDavidCell2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell2.swift; sourceTree = "<group>"; };
A5C5B3282B57CCBE00A7C5D1 /* YHDavidCell4.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell4.swift; sourceTree = "<group>"; };
A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell5.swift; sourceTree = "<group>"; };
A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBbxCollectionViewCell.swift; sourceTree = "<group>"; };
A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHChoiceButtonHoldView.swift; sourceTree = "<group>"; };
A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListHeaerView.swift; sourceTree = "<group>"; };
A5D001292BABC84A001F003C /* YHFileListBottomView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListBottomView.swift; sourceTree = "<group>"; };
......@@ -2202,15 +2178,6 @@
A5ACE95B2B45712D002C94D2 /* V */ = {
isa = PBXGroup;
children = (
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */,
A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */,
A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */,
A5C5B3282B57CCBE00A7C5D1 /* YHDavidCell4.swift */,
A5C5B3242B57C74900A7C5D1 /* YHDavidCell3.swift */,
A5C5B3262B57C8D500A7C5D1 /* YHDavidCell2.swift */,
A5C5B3222B57BF8F00A7C5D1 /* YHDavidCell1.swift */,
A5C5B3112B57B47D00A7C5D1 /* YHDavidCell0.swift */,
A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */,
044413F82BC279D200784A14 /* YHHomeWebBottomView.swift */,
044413FA2BC27E6F00784A14 /* YHHomeWebBottomButton.swift */,
A501BE652BC2B76200C4F1FB /* YHHomeHeadView.swift */,
......@@ -2233,9 +2200,6 @@
A5ACE95C2B457133002C94D2 /* C */ = {
isa = PBXGroup;
children = (
A5ACE95D2B4571BF002C94D2 /* YHHomeViewController.swift */,
A5C5B2FE2B55623700A7C5D1 /* YHMainContentBaseViewController.swift */,
A5C5B2E52B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift */,
044413F62BC2786200784A14 /* YHHomeWebViewController.swift */,
A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */,
A5173D672BC399B9007D4E74 /* YHHomePageViewController.swift */,
......@@ -2493,14 +2457,12 @@
045EEF012B9F171A0022A143 /* YHFormItemSelectSheetCell.swift in Sources */,
045EEEE52B9F171A0022A143 /* YHMySignatureDetailViewController.swift in Sources */,
A5ACE92F2B4564F7002C94D2 /* YHMyViewController.swift in Sources */,
A5C5B2E62B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift in Sources */,
A5ACE9332B4564F7002C94D2 /* NetBaseModel.swift in Sources */,
044E1E892BC3D7DF00A3B4AF /* YHSearchInfoBar.swift in Sources */,
045EEE9B2B9F171A0022A143 /* YHWorkExperienceViewModel.swift in Sources */,
045EEEC22B9F171A0022A143 /* YHOtherInfoFillViewController.swift in Sources */,
045EEE7C2B9F171A0022A143 /* YHPreviewInfoSessionModel.swift in Sources */,
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */,
A5C5B3002B55623800A7C5D1 /* YHMainContentBaseViewController.swift in Sources */,
045EEF112B9F171A0022A143 /* YHMainInformationModel.swift in Sources */,
A58AC09D2BABD59600A30FA9 /* YHFileListModel.swift in Sources */,
045EEEFF2B9F171A0022A143 /* YHSaveAndSubmitView.swift in Sources */,
......@@ -2513,7 +2475,6 @@
045EEF252B9F171A0022A143 /* YHMainInformationCardTableViewCell.swift in Sources */,
045EEE862B9F171A0022A143 /* YHPreviewWorkExpViewController.swift in Sources */,
045EEED22B9F171A0022A143 /* YHScoreTitleView.swift in Sources */,
A5ACE95E2B4571BF002C94D2 /* YHHomeViewController.swift in Sources */,
045EEEA72B9F171A0022A143 /* YHWorkExperienceViewController.swift in Sources */,
044E1E8B2BC3E1CE00A3B4AF /* YHSearchInfoCell.swift in Sources */,
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */,
......@@ -2559,7 +2520,6 @@
045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */,
045EEEA42B9F171A0022A143 /* YHImageResultViewController.swift in Sources */,
045EEE812B9F171A0022A143 /* YHPreviewQuestionAndAnswerModel.swift in Sources */,
A5C5B2E82B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift in Sources */,
045EEEB02B9F171A0022A143 /* YHWorkItemView.swift in Sources */,
0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */,
04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */,
......@@ -2601,13 +2561,11 @@
A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */,
045EEEE92B9F171A0022A143 /* YHFamilyRequestViewModel.swift in Sources */,
044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */,
A5C5B3232B57BF8F00A7C5D1 /* YHDavidCell1.swift in Sources */,
045EEEDF2B9F171A0022A143 /* YHCollegeSearchBar.swift in Sources */,
A5C5B2FB2B5535DF00A7C5D1 /* YHHomeBannerView.swift in Sources */,
A5ACE94B2B4564F7002C94D2 /* YHHUDRotatingImageView.swift in Sources */,
A5ACE94F2B4564F7002C94D2 /* YhOverlayView.swift in Sources */,
045EEEB92B9F171A0022A143 /* YHWorkMessageSelectTableViewCell.swift in Sources */,
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */,
044E1E812BC3BBC200A3B4AF /* YHSearchInfomationVC.swift in Sources */,
04A7BD0F2BA41C9800BD35A2 /* YHMyDocumentsModel.swift in Sources */,
A5ACE92E2B4564F7002C94D2 /* YHValidateCodeInputView.swift in Sources */,
......@@ -2627,7 +2585,6 @@
0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */,
043F0AB42BC7B80F006CB887 /* YHTestViewController.swift in Sources */,
048B2A4D2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift in Sources */,
A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */,
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */,
045EEECD2B9F171A0022A143 /* YHScoreDataModel.swift in Sources */,
A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */,
......@@ -2692,7 +2649,6 @@
049AC4CA2BC5141600F857F4 /* YHServerNoOrderView.swift in Sources */,
045EEEF72B9F171A0022A143 /* YHFormItemAddCell.swift in Sources */,
045EEEC82B9F171A0022A143 /* YHOtherSelecteItemView.swift in Sources */,
A5C5B3122B57B47D00A7C5D1 /* YHDavidCell0.swift in Sources */,
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */,
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */,
045EEECF2B9F171A0022A143 /* YHScoreOptionsView.swift in Sources */,
......@@ -2724,7 +2680,6 @@
04EA23082BB50753009DA928 /* YHDocumentMessageTableViewCell.swift in Sources */,
045EEE8E2B9F171A0022A143 /* YHPreviewInfoWorkSummaryView.swift in Sources */,
045EEECE2B9F171A0022A143 /* YHScoreDetailViewController.swift in Sources */,
A5C5B3252B57C74900A7C5D1 /* YHDavidCell3.swift in Sources */,
045EEE852B9F171A0022A143 /* YHPreviewFamilyMemberViewController.swift in Sources */,
045EEE7F2B9F171A0022A143 /* YHWorkExpInfoPreviewModel.swift in Sources */,
045EEEE72B9F171A0022A143 /* YHMySignatureListTableViewCell.swift in Sources */,
......@@ -2788,7 +2743,6 @@
044867B62BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift in Sources */,
045EEEE62B9F171A0022A143 /* YHMySignatureListViewController.swift in Sources */,
049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */,
A5C5B3292B57CCBE00A7C5D1 /* YHDavidCell4.swift in Sources */,
A582B23D2BB944ED009D098C /* YHHKPlanDoctumentVC.swift in Sources */,
045EEEE12B9F171A0022A143 /* YHMySignatureListViewModel.swift in Sources */,
04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */,
......@@ -2837,7 +2791,6 @@
A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */,
045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */,
045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */,
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */,
A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */,
045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */,
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */,
......@@ -2847,7 +2800,6 @@
04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */,
045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */,
A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */,
A5C5B3272B57C8D500A7C5D1 /* YHDavidCell2.swift in Sources */,
045EEEB72B9F171A0022A143 /* YHWorkItemAddView.swift in Sources */,
A5ACE9372B4564F7002C94D2 /* YHBaseUrlManager.swift in Sources */,
04EA230A2BB5172F009DA928 /* YHDocumentPromptTableViewCell.swift in Sources */,
......
//
// YHDavidTestViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/1/10.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import UIKit
import ESPullToRefresh
import JXSegmentedView
import GKNavigationBarSwift
class YHDavidTestViewController: YHBaseViewController {
var vcCanScroll : Bool = true
lazy var descripeLable:UILabel = {
let label = UILabel()
label.text = "赴港攻略,当日往返无忧,这个季节风景..赴港攻略,当日往返无忧,这个季节风景"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
label.numberOfLines = 2
label.lineBreakMode = .byTruncatingTail
return label
}()
lazy var headImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_person_icon"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var nameLable:UILabel = {
let label = UILabel()
label.text = "Fiona"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var dateLable:UILabel = {
let label = UILabel()
label.text = "12-12"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var heartImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_red_heart"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var numLable:UILabel = {
let label = UILabel()
label.text = "2000"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 14)
return label
}()
lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
}()
private lazy var bannerView: YHHomeBannerView = {
let view = YHHomeBannerView()
return view
}()
lazy var myCollectView = {
// 设置布局方向
let flowLayout = UICollectionViewFlowLayout()
let margin = 20.0
let gap = 20.0
let itemWidth = ceil((KScreenWidth - 2*margin - gap)/2.0)
flowLayout.itemSize = CGSize(width: itemWidth, height: 210 + 87 + 4)
flowLayout.minimumInteritemSpacing = 10.0
flowLayout.minimumLineSpacing = 10.0
flowLayout.scrollDirection = .vertical
let collectinoView = YHGestureCollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
collectinoView.backgroundColor = .white
collectinoView.register(YHAboutUsAdvantageCell.self, forCellWithReuseIdentifier:YHAboutUsAdvantageCell.cellReuseIdentifier)
collectinoView.register(YHDavidTestCollectionViewCell.self, forCellWithReuseIdentifier:YHDavidTestCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
collectinoView.translatesAutoresizingMaskIntoConstraints = false
collectinoView.alwaysBounceVertical = true
return collectinoView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
view.backgroundColor = .white
gk_navigationBar.isHidden = true
self.items = [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
self.myCollectView.reloadData()
}
}
extension YHDavidTestViewController {
private func loadFirstItem() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.items = [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
self.myCollectView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
self.myCollectView.reloadData()
}
}
private func loadFakeData() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.myCollectView.es.stopLoadingMore()
self.myCollectView.reloadData()
}
}
func setupUI() {
gk_navTitle = "David的测试UI"
view.backgroundColor = .white
view.addSubview(myCollectView)
myCollectView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalToSuperview().offset(10)
}
self.myCollectView.es.addInfiniteScrolling {
self.loadFakeData()
}
}
}
extension YHDavidTestViewController: UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHDavidTestCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHDavidTestCollectionViewCell
return cell
}
private func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
print("index is \(indexPath.row)")
}
}
// MARK: - JXSegmentedListContainerViewListDelegate
extension YHDavidTestViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
// MARK: - 滑动使用
extension YHDavidTestViewController: UIScrollViewDelegate {
//控制滑动交互
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let scrollViewSet: CGFloat = scrollView.contentOffset.y
if vcCanScroll == false {//不能滚动时
scrollView.contentOffset = CGPoint(x: -20, y: 0)
} else {
if (scrollViewSet <= 0) {
scrollView.contentOffset = CGPoint(x: -20, y: 0)
vcCanScroll = false
NotificationCenter.default.post(name: Notification.Name(rawValue: "leaveTop"), object: nil)
} else {
scrollView.contentOffset = CGPoint(x: -20, y: scrollViewSet)
}
}
}
}
//
// YHHomeViewCoontroller.swift
// galaxy
//
// Created by davidhuangA on 2024/1/3.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import Foundation
import GKNavigationBarSwift
import JXSegmentedView
import SafariServices
class YHHomeViewController: YHBaseViewController {
let sectionHeaderHeight : CGFloat = 40
let cellHeight : CGFloat = 80
var arrItemVc : [UIViewController] = []
var canScroll : Bool = true
var myCellHeight : CGFloat {
get {
return view.bounds.size.height - homeNavBarView.height - k_TabBar_Height
}
}
let cellView: YHMainContentBaseViewController = YHMainContentBaseViewController()
//model 及网络请求
lazy var homeReqVM : YHHomePageViewModel = {
return YHHomePageViewModel()
}()
//头部背景图片
lazy var headBkgImagV: UIImageView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "home_head_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
//自定义导航栏
lazy var homeNavBarView: UIView = {
let view1 = UIView()
view1.backgroundColor = .clear
view1.isUserInteractionEnabled = true
let icon = UIImageView(image: UIImage(named: "home_nav_icon"))
icon.contentMode = .scaleAspectFill
view1.addSubview(icon)
icon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(16)
make.height.equalTo(26)
make.width.equalTo(120)
}
let btnMsg = UIButton(type: .custom)
btnMsg.setImage(UIImage(named: "home_nav_msg"), for: .normal)
view1.addSubview(btnMsg)
btnMsg.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-16)
make.height.width.equalTo(34)
}
btnMsg.addTarget(self, action: #selector(tapSearch), for: .touchUpInside)
let btnSearch = UIButton(type: .custom)
btnSearch.setImage(UIImage(named: "home_nav_search"), for: .normal)
btnSearch.addTarget(self, action: #selector(tapSearch), for: .touchUpInside)
view1.addSubview(btnSearch)
btnSearch.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(btnMsg.snp.left).offset(-12)
make.height.width.equalTo(34)
}
return view1
}()
var homeTableView: YHGestureTableView = {
let tableView = YHGestureTableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
// tableView.rowHeight = UITableView.automaticDimension
// tableView.estimatedRowHeight = 100
// tableView.register(YHHomeCustomCell.self, forCellReuseIdentifier: YHHomeCustomCell.cellReuseIdentifier)
tableView.register(YHDavidCell0.self,forCellReuseIdentifier: YHDavidCell0.cellReuseIdentifier)
tableView.register(YHDavidCell1.self,forCellReuseIdentifier: YHDavidCell1.cellReuseIdentifier)
tableView.register(YHDavidCell3.self,forCellReuseIdentifier: YHDavidCell3.cellReuseIdentifier)
tableView.register(YHDavidCell2.self,forCellReuseIdentifier: YHDavidCell2.cellReuseIdentifier)
tableView.register(YHDavidCell4.self,forCellReuseIdentifier: YHDavidCell4.cellReuseIdentifier)
tableView.register(YHDavidCell5.self,forCellReuseIdentifier: YHDavidCell5.cellReuseIdentifier)
return tableView
}()
let arrItemTitles = ["推荐","子女教育","税务规划","民生医疗","成功案例","我的服务","行业资讯","香港生活","你我他","我是很长的tag呀"]
let segmentView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 40))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource()
dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 16)
dataSource.titleNormalColor = UIColor(hexString: "#888F98")!
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18)
dataSource.titleSelectedColor = .brandMainColor
dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension
dataSource.itemSpacing = 24
return dataSource
}()
// MARK: - 生命周期方法
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(leaveTopOp), name:Notification.Name(rawValue: "leaveTop"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(beginDragging), name:Notification.Name(rawValue: "scrollViewWillBeginDragging"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging"), object: nil)
//1.UI
initView()
// testModelParse()//for test hjl 添加 数据类型 转换
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}
}
// MARK: - 私有方法
extension YHHomeViewController {
func testModelParse() {
// SmartConfig.debugMode = .verbose
let json = """
{
"data": "balabala Team",
"errorCode": 0,
"errorMessage": "操作成功",
"success":true,
"test": {
"test1": "test1-value",
"test2": "test2-value",
"test333": "test3-value",
},
"testArr":[
{
"test1": "test1-value",
"test2": "test2-value",
"test333": "test3-value",
},
{
"test1": "test1-value",
"test2": "test2-value",
"test333": "test3-value",
},
{
"test1": "test1-value",
"test2": "test2-value",
"test333": "test3-value",
}
]
}
"""
//1. json字符串 转 对象
guard let model = NetBaseModel.deserialize(json: json) else { return }
print("model 是 ==>",model)
print(model)
//2. 对象 转 dictionary
let dic = model.toDictionary()
print("dic 是 ==>",dic as Any)
//3. dictionary 转 string
let jsonString = dic?.jsonString()
print("jsonString 是 ==>",jsonString ?? "")
//4.model 转 string
let jsonString2 = model.toJSONString()
print("jsonString2 是 ==>",jsonString2 ?? "")
//5. dic 转 model
guard let model1 = NetBaseModel.deserialize(dict: dic) else { return }
print("model1 是 ==>",model1)
}
@objc func leaveTopOp() {
canScroll = true
}
@objc func beginDragging() {
homeTableView.isScrollEnabled = false
canScroll = false
}
@objc func endDragging() {
homeTableView.isScrollEnabled = true
canScroll = true
}
private func requestData() {
}
private func initView()->Void {
gk_navigationBar.isHidden = true
view.addSubview(headBkgImagV)
headBkgImagV.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(307)
}
view.addSubview(homeNavBarView)
homeNavBarView.layer.zPosition = 1
homeNavBarView.snp.makeConstraints { make in
make.top.equalTo(k_Height_safeAreaInsetsTop())
make.left.right.equalToSuperview()
make.height.equalTo(48)
}
homeTableView.delegate = self
homeTableView.dataSource = self
view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.equalTo(homeNavBarView.snp.bottom).offset(0)
make.left.right.bottom.equalToSuperview()
}
self.homeTableView.es.addPullToRefresh {
self.loadFirstItem()
}
self.homeTableView.es.startPullToRefresh()
self.homeTableView.es.addInfiniteScrolling {
self.loadFakeData()
}
}
private func loadFirstItem() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.homeTableView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
self.homeTableView.reloadData()
}
}
private func loadFakeData() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.homeTableView.es.stopLoadingMore()
self.homeTableView.reloadData()
}
}
@objc func tapSearch() {
printLog("*")
navigationController?.pushViewController(YHDavidTestViewController())
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHHomeViewController : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 6
}
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if section == 0 {
return 0
}
return 0
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 0 {
return UIView()
}
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
if indexPath.row == 0 {
return 136
} else if indexPath.row == 1 {
return 194
} else if indexPath.row == 2 {
return 113
} else if indexPath.row == 3 {
return 138 + 15
} else if indexPath.row == 4 {
return YHDavidCell4.cellHeight
} else if indexPath.row == 5 {
return YHDavidCell5.cellHeight
}
return 100
}
return CGRectGetHeight(self.view.bounds)
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell0.cellReuseIdentifier, for: indexPath) as! YHDavidCell0
return cell
} else if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell1.cellReuseIdentifier, for: indexPath) as! YHDavidCell1
return cell
} else if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell2.cellReuseIdentifier, for: indexPath) as! YHDavidCell2
return cell
} else if indexPath.row == 3 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell3.cellReuseIdentifier, for: indexPath) as! YHDavidCell3
return cell
} else if indexPath.row == 4 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell4.cellReuseIdentifier, for: indexPath) as! YHDavidCell4
return cell
} else if indexPath.row == 5 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell5.cellReuseIdentifier, for: indexPath) as! YHDavidCell5
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell0.cellReuseIdentifier, for: indexPath) as! YHDavidCell0
return cell
}
let cell = UITableViewCell()
cellView.view.frame = CGRect(x: 0, y: 0, width: cell.contentView.bounds.size.width, height: myCellHeight)
cell.contentView.addSubview(cellView.view)
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
let vc = YHHomeWebViewController()
self.navigationController?.pushViewController(vc)
}
}
extension YHHomeViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let bottomCellOffset: CGFloat = homeTableView.rect(forSection: 1).origin.y - 64 + 80 - 12 //48
if (scrollView.contentOffset.y >= bottomCellOffset) {
scrollView.contentOffset = CGPointMake(0, bottomCellOffset)
if canScroll == true {
canScroll = false
//传递参数到 子VC
cellView.canScroll = true
}
}else{
if canScroll == false {
scrollView.contentOffset = CGPoint(x: 0, y: bottomCellOffset)
}
}
self.homeTableView.showsVerticalScrollIndicator = false
}
}
extension YHHomeViewController: SFSafariViewControllerDelegate {
// MARK: 点击左上角的完成
func safariViewControllerDidFinish(_ controller: SFSafariViewController) {
print(#function)
}
// MARK: 加载完成
func safariViewController(_ controller: SFSafariViewController, didCompleteInitialLoad didLoadSuccessfully: Bool) {
print(#function)
}
// MARK: 点击右下角调用Safari浏览器打开
func safariViewControllerWillOpenInBrowser(_ controller: SFSafariViewController) {
print(#function)
}
}
//
// ContentBaseViewController.swift
// JXSegmentedView
//
// Created by jiaxin on 2018/12/26.
// Copyright © 2018 jiaxin. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHMainContentBaseViewController: UIViewController {
var canScroll : Bool = false {
didSet {
for vc in arrItemVCs {
vc.vcCanScroll = canScroll
}
}
}
let arrItemTitles = ["推荐","子女教育","税务规划","民生医疗","成功案例","我的服务","行业资讯","香港生活","你我他","我是很长的tag呀"]
var arrItemVCs : [YHDavidTestViewController] = []
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 40))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource()
dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 16)
dataSource.titleNormalColor = .labelTextColor2
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18)
dataSource.titleSelectedColor = .brandMainColor
dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension
dataSource.itemSpacing = 24
return dataSource
}()
//分类title 所对应的VC
lazy var listContainerView: JXSegmentedListContainerView! = {
return JXSegmentedListContainerView(dataSource: self, type: .collectionView)
}()
override func viewDidLoad() {
super.viewDidLoad()
for _ in arrItemTitles {
let vc = YHDavidTestViewController()
arrItemVCs.append(vc)
}
//segmentedViewDataSource一定要通过属性强持有!!!!!!!!!
segmentedView.dataSource = segmentedDataSource
segmentedView.delegate = self
view.addSubview(segmentedView)
segmentedView.listContainer = listContainerView
view.addSubview(listContainerView)
//分类Title
segmentedView.dataSource = segmentedDataSource
segmentedView.delegate = self
//配置指示器
let indicator = JXSegmentedIndicatorLineView()
indicator.indicatorWidth = 16
indicator.indicatorColor = .blue
segmentedView.indicators = [indicator]
segmentedView.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
//处于第一个item的时候,才允许屏幕边缘手势返回
navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
//离开页面的时候,需要恢复屏幕边缘手势,不能影响其他页面
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
segmentedView.frame = CGRect(x: 0, y: 0, width: view.bounds.size.width, height: 50)
listContainerView.frame = CGRect(x: 0, y: 50, width: view.bounds.size.width, height: view.bounds.size.height - 50)
}
}
extension YHMainContentBaseViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewDidEndDragging"), object: nil)
}
/// 正在滚动中的回调
///
/// - Parameters:
/// - segmentedView: JXSegmentedView
/// - leftIndex: 正在滚动中,相对位置处于左边的index
/// - rightIndex: 正在滚动中,相对位置处于右边的index
/// - percent: 从左往右计算的百分比
func segmentedView(_ segmentedView: JXSegmentedView, scrollingFrom leftIndex: Int, to rightIndex: Int, percent: CGFloat) {
NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewWillBeginDragging"), object: nil)
}
}
extension YHMainContentBaseViewController: JXSegmentedListContainerViewDataSource {
func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int {
if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource {
return titleDataSource.dataSource.count
}
return 0
}
func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {
return arrItemVCs[index]
}
}
//
// YHBbxCollectionViewCell.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHBbxCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHBbxCollectionViewCell"
static let bbxCellHeight = 64
static let bbxCellWidth = 80
lazy var titleImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_bbx_icon"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var descripeLable:UILabel = {
let label = UILabel()
label.textColor = UIColor(red: 0.315, green: 0.315, blue: 0.315, alpha: 1)
label.font = UIFont.PFSC_R(ofSize: 12)
label.textAlignment = .center
label.text = "证件办理"
// label.backgroundColor = .blue
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
private func setupUI() {
contentView.addSubview(titleImageView)
titleImageView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.height.width.equalTo(44)
make.centerX.equalToSuperview()
}
contentView.addSubview(descripeLable)
descripeLable.snp.makeConstraints { make in
make.top.equalTo(titleImageView.snp.bottom).offset(4)
make.centerX.equalToSuperview()
make.height.equalTo(16)
make.left.right.equalToSuperview()
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell0: UITableViewCell {
static let cellReuseIdentifier = "YHDavidCell0"
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var headImage: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleAspectFill
imagV.image = UIImage(named: "home_cell0_head_icon")
return imagV
}()
lazy var contentImage: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleAspectFill
imagV.image = UIImage(named: "home_cell0_content_icon")
return imagV
}()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(headImage)
contentView.addSubview(contentImage)
contentImage.snp.makeConstraints { make in
make.top.equalToSuperview().offset(12)
make.right.equalToSuperview().offset(-16)
make.width.equalTo(242)
make.height.equalTo(97)
}
headImage.snp.makeConstraints { make in
make.right.equalTo(contentImage.snp.left)
make.width.equalTo(88)
make.height.equalTo(122)
make.bottom.equalToSuperview()
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell1: UITableViewCell {
static let cellReuseIdentifier = "YHDavidCell1"
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var bigImageView: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleToFill
imagV.image = UIImage(named: "home_cell1_bkg")
return imagV
}()
lazy var subContentView : UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x999999, alpha: 1.0)
view.layer.cornerRadius = kCornerRadius6
return view
}()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(182)
}
subContentView.addSubview(bigImageView)
bigImageView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(182)
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell2: UITableViewCell {
static let cellReuseIdentifier = "YHDavidCell2"
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var bigImageView: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleToFill
imagV.image = UIImage(named: "home_cell1_bkg")
return imagV
}()
lazy var subContentView : UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x999999, alpha: 1.0)
view.layer.cornerRadius = kCornerRadius6
view.layer.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1).cgColor
view.layer.cornerRadius = 10
view.layer.borderWidth = 0.5
view.layer.borderColor = UIColor(red: 0.862, green: 0.862, blue: 0.862, alpha: 1).cgColor
return view
}()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(99)
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell3: UITableViewCell {
static let cellReuseIdentifier = "YHDavidCell3"
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var bigImageView: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleToFill
imagV.image = UIImage(named: "home_cell1_bkg")
return imagV
}()
lazy var subContentView : UIView = {
let view = UIView()
view.layer.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1).cgColor
return view
}()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(138)
}
let bbxLable = UILabel()
bbxLable.text = "银河推荐官"
bbxLable.textColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1)
bbxLable.font = UIFont.PFSC_R(ofSize: 18)
subContentView.addSubview(bbxLable)
bbxLable.snp.makeConstraints { make in
make.top.equalTo(13)
make.left.equalTo(25)
}
let desLable = UILabel()
desLable.text = "邀请拉新,合作共赢"
desLable.frame = CGRect(x: 0, y: 0, width: 141.5, height: 11.5)
desLable.textColor = UIColor(red: 0.592, green: 0.592, blue: 0.592, alpha: 1)
desLable.font = UIFont.PFSC_R(ofSize: 10)
subContentView.addSubview(desLable)
desLable.snp.makeConstraints { make in
make.left.equalTo(bbxLable.snp.right).offset(11)
make.centerY.equalTo(bbxLable)
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import FSPagerView
class YHDavidCell4: UITableViewCell {
fileprivate var dataArr: [YHBannerModel] = [YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel()]
static let cellHeight : CGFloat = 88 + 20
static let cellReuseIdentifier = "YHDavidCell4"
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var subContentView : UIView = {
let view = UIView()
// view.backgroundColor = .red
return view
}()
private lazy var bannerView: FSPagerView = {
let view = FSPagerView()
view.delegate = self
view.dataSource = self
view.automaticSlidingInterval = 2
view.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
view.itemSize = FSPagerView.automaticSize
view.interitemSpacing = 10
view.isInfinite = true
return view
}()
lazy var pageControl: FSPageControl = {
let view = FSPageControl()
return view
}()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalToSuperview()
}
subContentView.addSubview(bannerView)
bannerView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(80)
}
subContentView.addSubview(pageControl)
pageControl.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(bannerView.snp.bottom)
make.height.equalTo(20)
}
setupPageControl()
bannerView.reloadData()
}
func setupPageControl() {
self.pageControl.numberOfPages = self.dataArr.count
self.pageControl.contentHorizontalAlignment = .center
let normalImage = UIImage(color: .white, size: CGSize(width: 15, height: 5))
let selectImage = UIImage(color: UIColor(hex: 0xff0000, alpha: 1.0), size: CGSize(width: 20, height: 5))
self.pageControl.setImage(normalImage, for: .normal)
self.pageControl.setImage(selectImage, for: .selected)
self.pageControl.interitemSpacing = 15
}
}
// MARK: - FSPagerViewDelegate
extension YHDavidCell4: FSPagerViewDataSource, FSPagerViewDelegate {
public func numberOfItems(in pagerView: FSPagerView) -> Int {
return self.dataArr.count
}
public func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index)
let image = UIImage(named: "default_placeholder_image")?.bs_scaled(toWidth: UIDevice.kScreenW - 16*2, opaque: false)
cell.imageView?.image = image
if index < dataArr.count {
let model = dataArr[index]
if let url = URL(string: model.img_url) {
cell.imageView?.kf.setImage(with: url)
}
// cell.textLabel?.text = model.title
}
cell.imageView?.contentMode = .scaleAspectFill
cell.backgroundColor = .contentBkgColor
cell.contentView.layer.shadowColor = UIColor.clear.cgColor
return cell
}
func pagerViewWillEndDragging(_ pagerView: FSPagerView, targetIndex: Int) {
self.pageControl.currentPage = targetIndex
}
func pagerViewDidEndScrollAnimation(_ pagerView: FSPagerView) {
self.pageControl.currentPage = pagerView.currentIndex
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell5: UITableViewCell {
static let cellHeight : CGFloat = 219
static let cellReuseIdentifier = "YHDavidCell5"
let items : [Int32] = [1,2,3,4,5,6,7,8]
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var subContentView : UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
var myCollectView : UICollectionView!
// lazy var myCollectView = {
// // 设置布局方向
//
//
//
// return collectinoView
// }()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
let bbxLable = UILabel()
bbxLable.text = "百宝箱"
bbxLable.textColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1)
bbxLable.font = UIFont.PFSC_R(ofSize: 18)
subContentView.addSubview(bbxLable)
bbxLable.snp.makeConstraints { make in
make.top.equalTo(13)
make.left.equalTo(25)
}
let desLable = UILabel()
desLable.text = "香港本地宝,智慧小助手"
desLable.frame = CGRect(x: 0, y: 0, width: 141.5, height: 11.5)
desLable.textColor = UIColor(red: 0.592, green: 0.592, blue: 0.592, alpha: 1)
desLable.font = UIFont.PFSC_R(ofSize: 10)
subContentView.addSubview(desLable)
desLable.snp.makeConstraints { make in
make.left.equalTo(bbxLable.snp.right).offset(11)
make.centerY.equalTo(bbxLable)
}
// subContentView.backgroundColor = UIColor(hex: 0x999999)
let flowLayout = UICollectionViewFlowLayout()
let margin = 16.0
let gap = 20.0
let itemWidth = 80.0
flowLayout.itemSize = CGSize(width: itemWidth, height: 64)
flowLayout.minimumInteritemSpacing = (KScreenWidth - 2 * 16 - 2*16 - 4 * itemWidth)/4
flowLayout.minimumLineSpacing = 15.0
flowLayout.scrollDirection = .vertical
let collectinoView = YHGestureCollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.contentInset = UIEdgeInsets(top: 0, left: margin, bottom: 20, right: margin)
collectinoView.backgroundColor = .white
collectinoView.register(YHBbxCollectionViewCell.self, forCellWithReuseIdentifier:YHBbxCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
collectinoView.translatesAutoresizingMaskIntoConstraints = false
collectinoView.alwaysBounceVertical = true
myCollectView = collectinoView
myCollectView.isScrollEnabled = false
subContentView.addSubview(myCollectView)
myCollectView.snp.makeConstraints { make in
make.top.equalTo(bbxLable.snp.bottom).offset(15)
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.bottom.equalToSuperview().offset(-20)
}
}
}
extension YHDavidCell5: UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHBbxCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHBbxCollectionViewCell
return cell
}
private func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
print("index is \(indexPath.row)")
}
}
//
// YHDavidTestCollectionViewCell.swift
// galaxy
//
// Created by davidhuangA on 2024/1/10.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import UIKit
class YHDavidTestCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHDavidTestCollectionViewCell"
lazy var titleImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "start_page_bkg"))
imageV.contentMode = .scaleAspectFill
imageV.roundCorners(UIRectCorner.topLeft, radius: 8)
imageV.roundCorners(UIRectCorner.topRight, radius: 8)
return imageV
}()
lazy var descripeLable:UILabel = {
let label = UILabel()
label.text = "赴港攻略,当日往返无忧,这个季节风景..赴港攻略,当日往返无忧,这个季节风景"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
label.numberOfLines = 2
label.lineBreakMode = .byTruncatingTail
return label
}()
lazy var headImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_person_icon"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var nameLable:UILabel = {
let label = UILabel()
label.text = "Fiona"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var dateLable:UILabel = {
let label = UILabel()
label.text = "12-12"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var heartImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_red_heart"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var numLable:UILabel = {
let label = UILabel()
label.text = "2000"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 14)
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
private func setupUI() {
contentView.backgroundColor = UIColor(hexString: "#F8F9FB")
contentView.roundCorners([.topLeft,.topRight], radius: 4)
contentView.clipsToBounds = true
contentView.addSubview(titleImageView)
titleImageView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(210)
}
let subHoldView = UIView()
subHoldView.layer.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1).cgColor
subHoldView.layer.borderWidth = 0.5
subHoldView.layer.borderColor = UIColor(red: 0.798, green: 0.798, blue: 0.798, alpha: 1).cgColor
contentView.addSubview(subHoldView)
subHoldView.snp.makeConstraints { make in
make.top.equalTo(titleImageView.snp.bottom).offset(4)
make.left.right.equalToSuperview()
make.height.equalTo(87)
}
subHoldView.addSubview(descripeLable)
descripeLable.snp.makeConstraints { make in
make.top.equalToSuperview().offset(8)
make.left.equalToSuperview().offset(8)
make.right.equalToSuperview().offset(-8)
make.height.equalTo(30)
}
subHoldView.addSubview(headImageView)
headImageView.snp.makeConstraints { make in
make.top.equalTo(descripeLable.snp.bottom).offset(10)
make.left.equalTo(descripeLable.snp.left)
make.height.width.equalTo(25)
}
subHoldView.addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.top.equalTo(headImageView.snp.top)
make.left.equalTo(headImageView.snp.right).offset(5)
make.height.equalTo(12)
make.width.equalTo(50)
}
subHoldView.addSubview(dateLable)
dateLable.snp.makeConstraints { make in
make.top.equalTo(nameLable.snp.bottom).offset(2)
make.left.equalTo(nameLable.snp.left)
make.height.equalTo(12)
make.right.equalTo(nameLable.snp.right)
}
subHoldView.addSubview(numLable)
numLable.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-8)
make.height.equalTo(12)
make.centerY.equalTo(headImageView.snp.centerY)
}
subHoldView.addSubview(heartImageView)
heartImageView.snp.makeConstraints { make in
make.right.equalTo(numLable.snp.left).offset(-6)
make.height.width.equalTo(12)
make.centerY.equalTo(headImageView.snp.centerY)
}
}
}
......@@ -18,11 +18,6 @@ extension YHGestureTableView: UIGestureRecognizerDelegate {
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
// open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
// return true
// }
}
......@@ -38,11 +33,6 @@ extension YHGestureScrollView: UIGestureRecognizerDelegate {
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
// open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
// return true
// }
}
......@@ -57,9 +47,4 @@ extension YHGestureCollectionView: UIGestureRecognizerDelegate {
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
// open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
// return true
// }
}
//
// YHHomeCustomCell.swift
// galaxy
//
// Created by davidhuangA on 2024/1/10.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import UIKit
class YHHomeCustomCell: UITableViewCell {
static let cellReuseIdentifier = "YHHomeCustomCell"
lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),
AboutAdvantageItem(iconName: "about_response", title: "快速响应", detail: "身份规划师一对一专业服务,第一时间响应您的需求", url: ""),
AboutAdvantageItem(iconName: "about_service", title: "专业服务", detail: "5年经验+英语专8级文案导师团队倾力支持", url: ""),
AboutAdvantageItem(iconName: "about_service2", title: "精准匹配", detail: "香港专才、香港留学获批常年保持90%以上", url: "")]
}()
var dataArray: [String] = [] // 假定我们的数据结构就是一个String数组
var collectionView: UICollectionView!
var collectionContainer: UIView!
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
// 设置布局方向
let flowLayout = UICollectionViewFlowLayout()
let margin = 18.0
let gap = 12.0
let itemWidth = floor((KScreenWidth-2*margin-gap)/2.0)
flowLayout.itemSize = CGSize(width: itemWidth, height: itemWidth)
flowLayout.minimumInteritemSpacing = 12.0
flowLayout.minimumLineSpacing = 12.0
flowLayout.scrollDirection = .vertical
collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectionView.contentInset = UIEdgeInsets(top: 0, left: margin, bottom: 0, right: margin)
collectionView.backgroundColor = UIColor.white
collectionView.register(YHAboutUsAdvantageCell.self, forCellWithReuseIdentifier:YHAboutUsAdvantageCell.cellReuseIdentifier)
collectionView.delegate = self
collectionContainer = UIView(frame: .zero)
contentView.addSubview(collectionContainer)
collectionContainer.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(0)
}
collectionContainer.addSubview(collectionView)
collectionView.snp.makeConstraints({ make in
make.edges.equalToSuperview()
})
// collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "test")
// collectionView.delegate = self // 这里根据具体业务写吧,demo中我就把代理直接设置成cell了..
// collectionView.dataSource = self // 根据业务,demo直接先cell持有数据来控制collectionView的显示了..
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
// 外部调用,用来设置collectionView的数据源
func setData(_ data: [String]) {
self.dataArray = data
collectionView.reloadData()
// 这里需要 layoutIfNeeded 一下,否则我们不能同步拿到contentSize
// 注意,如果上面collectionContainer的布局没有指明宽度,这个时候cell的宽度是estimate状态,所以下面就算layout也拿不到正确的contentSize
collectionView.layoutIfNeeded()
let height = collectionView.contentSize.height
printLog(height)
collectionContainer.snp.updateConstraints { make in
make.height.equalTo(height)
}
}
}
extension YHHomeCustomCell: UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHAboutUsAdvantageCell.cellReuseIdentifier, for: indexPath) as! YHAboutUsAdvantageCell
cell.advantateItem = items[indexPath.row]
return cell
}
private func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
print("index is \(indexPath.row)")
}
}
//
// YHHomeViewController.swift
// YHServiceCenterMainViewController.swift
// galaxy
//
// Created by EDY on 2023/12/20.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment