Commit 24ecf2bb139d4c0268029d09f9850f4e8a7a5210
1 parent
1a1054c3
类名修改
Showing
6 changed files
with
72 additions
and
72 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -57,11 +57,11 @@ | @@ -57,11 +57,11 @@ | ||
| 57 | 7C4931362A307B60000E44B4 /* slide_up.gif in Resources */ = {isa = PBXBuildFile; fileRef = 7C4931352A307B60000E44B4 /* slide_up.gif */; }; | 57 | 7C4931362A307B60000E44B4 /* slide_up.gif in Resources */ = {isa = PBXBuildFile; fileRef = 7C4931352A307B60000E44B4 /* slide_up.gif */; }; |
| 58 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */; }; | 58 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */; }; |
| 59 | 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675282A270F6A008354C1 /* WJColorChange.m */; }; | 59 | 7CD675292A270F6A008354C1 /* WJColorChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675282A270F6A008354C1 /* WJColorChange.m */; }; |
| 60 | - 7CD6753C2A2740B0008354C1 /* CNBottomPayMoneyRemindView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675372A2740B0008354C1 /* CNBottomPayMoneyRemindView.swift */; }; | 60 | + 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675372A2740B0008354C1 /* CNUpSlideViewRemindView.swift */; }; |
| 61 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675382A2740B0008354C1 /* CNMainView.swift */; }; | 61 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675382A2740B0008354C1 /* CNMainView.swift */; }; |
| 62 | - 7CD6753E2A2740B0008354C1 /* CNPayMoneyCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675392A2740B0008354C1 /* CNPayMoneyCodeView.swift */; }; | ||
| 63 | - 7CD6753F2A2740B0008354C1 /* CNTopCollectMoneyRemindView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD6753A2A2740B0008354C1 /* CNTopCollectMoneyRemindView.swift */; }; | ||
| 64 | - 7CD675402A2740B0008354C1 /* CNCollectMoneyCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD6753B2A2740B0008354C1 /* CNCollectMoneyCodeView.swift */; }; | 62 | + 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675392A2740B0008354C1 /* CNUpSlideView.swift */; }; |
| 63 | + 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD6753A2A2740B0008354C1 /* CNDownSlideViewRemindView.swift */; }; | ||
| 64 | + 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD6753B2A2740B0008354C1 /* CNDownSlideView.swift */; }; | ||
| 65 | 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */; }; | 65 | 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */; }; |
| 66 | 7CD675472A274167008354C1 /* NewPagedFlowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675442A274167008354C1 /* NewPagedFlowView.m */; }; | 66 | 7CD675472A274167008354C1 /* NewPagedFlowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675442A274167008354C1 /* NewPagedFlowView.m */; }; |
| 67 | 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675462A274167008354C1 /* PGIndexBannerSubiew.m */; }; | 67 | 7CD675482A274167008354C1 /* PGIndexBannerSubiew.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD675462A274167008354C1 /* PGIndexBannerSubiew.m */; }; |
| @@ -149,11 +149,11 @@ | @@ -149,11 +149,11 @@ | ||
| 149 | 7CD675262A270F69008354C1 /* metaCode-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "metaCode-Bridging-Header.h"; sourceTree = "<group>"; }; | 149 | 7CD675262A270F69008354C1 /* metaCode-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "metaCode-Bridging-Header.h"; sourceTree = "<group>"; }; |
| 150 | 7CD675272A270F6A008354C1 /* WJColorChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WJColorChange.h; sourceTree = "<group>"; }; | 150 | 7CD675272A270F6A008354C1 /* WJColorChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WJColorChange.h; sourceTree = "<group>"; }; |
| 151 | 7CD675282A270F6A008354C1 /* WJColorChange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WJColorChange.m; sourceTree = "<group>"; }; | 151 | 7CD675282A270F6A008354C1 /* WJColorChange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WJColorChange.m; sourceTree = "<group>"; }; |
| 152 | - 7CD675372A2740B0008354C1 /* CNBottomPayMoneyRemindView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNBottomPayMoneyRemindView.swift; sourceTree = "<group>"; }; | 152 | + 7CD675372A2740B0008354C1 /* CNUpSlideViewRemindView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNUpSlideViewRemindView.swift; sourceTree = "<group>"; }; |
| 153 | 7CD675382A2740B0008354C1 /* CNMainView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNMainView.swift; sourceTree = "<group>"; }; | 153 | 7CD675382A2740B0008354C1 /* CNMainView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNMainView.swift; sourceTree = "<group>"; }; |
| 154 | - 7CD675392A2740B0008354C1 /* CNPayMoneyCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNPayMoneyCodeView.swift; sourceTree = "<group>"; }; | ||
| 155 | - 7CD6753A2A2740B0008354C1 /* CNTopCollectMoneyRemindView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNTopCollectMoneyRemindView.swift; sourceTree = "<group>"; }; | ||
| 156 | - 7CD6753B2A2740B0008354C1 /* CNCollectMoneyCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNCollectMoneyCodeView.swift; sourceTree = "<group>"; }; | 154 | + 7CD675392A2740B0008354C1 /* CNUpSlideView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNUpSlideView.swift; sourceTree = "<group>"; }; |
| 155 | + 7CD6753A2A2740B0008354C1 /* CNDownSlideViewRemindView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNDownSlideViewRemindView.swift; sourceTree = "<group>"; }; | ||
| 156 | + 7CD6753B2A2740B0008354C1 /* CNDownSlideView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNDownSlideView.swift; sourceTree = "<group>"; }; | ||
| 157 | 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNCustomIndexView.swift; sourceTree = "<group>"; }; | 157 | 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNCustomIndexView.swift; sourceTree = "<group>"; }; |
| 158 | 7CD675432A274167008354C1 /* PGIndexBannerSubiew.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PGIndexBannerSubiew.h; sourceTree = "<group>"; }; | 158 | 7CD675432A274167008354C1 /* PGIndexBannerSubiew.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PGIndexBannerSubiew.h; sourceTree = "<group>"; }; |
| 159 | 7CD675442A274167008354C1 /* NewPagedFlowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewPagedFlowView.m; sourceTree = "<group>"; }; | 159 | 7CD675442A274167008354C1 /* NewPagedFlowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewPagedFlowView.m; sourceTree = "<group>"; }; |
| @@ -456,11 +456,11 @@ | @@ -456,11 +456,11 @@ | ||
| 456 | 7CD675232A26F8F8008354C1 /* View */ = { | 456 | 7CD675232A26F8F8008354C1 /* View */ = { |
| 457 | isa = PBXGroup; | 457 | isa = PBXGroup; |
| 458 | children = ( | 458 | children = ( |
| 459 | - 7CD675372A2740B0008354C1 /* CNBottomPayMoneyRemindView.swift */, | ||
| 460 | - 7CD6753B2A2740B0008354C1 /* CNCollectMoneyCodeView.swift */, | 459 | + 7CD675372A2740B0008354C1 /* CNUpSlideViewRemindView.swift */, |
| 460 | + 7CD6753B2A2740B0008354C1 /* CNDownSlideView.swift */, | ||
| 461 | 7CD675382A2740B0008354C1 /* CNMainView.swift */, | 461 | 7CD675382A2740B0008354C1 /* CNMainView.swift */, |
| 462 | - 7CD675392A2740B0008354C1 /* CNPayMoneyCodeView.swift */, | ||
| 463 | - 7CD6753A2A2740B0008354C1 /* CNTopCollectMoneyRemindView.swift */, | 462 | + 7CD675392A2740B0008354C1 /* CNUpSlideView.swift */, |
| 463 | + 7CD6753A2A2740B0008354C1 /* CNDownSlideViewRemindView.swift */, | ||
| 464 | 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */, | 464 | 7CD675412A2740F8008354C1 /* CNCustomIndexView.swift */, |
| 465 | 7C4931302A2F142F000E44B4 /* CNHomePageBackgroupView.swift */, | 465 | 7C4931302A2F142F000E44B4 /* CNHomePageBackgroupView.swift */, |
| 466 | 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */, | 466 | 7C4931372A307BDB000E44B4 /* CNHomePageGuideView.swift */, |
| @@ -807,8 +807,8 @@ | @@ -807,8 +807,8 @@ | ||
| 807 | 7CD675522A29C04B008354C1 /* CNLiveConstant.swift in Sources */, | 807 | 7CD675522A29C04B008354C1 /* CNLiveConstant.swift in Sources */, |
| 808 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, | 808 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, |
| 809 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */, | 809 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */, |
| 810 | - 7CD6753E2A2740B0008354C1 /* CNPayMoneyCodeView.swift in Sources */, | ||
| 811 | - 7CD675402A2740B0008354C1 /* CNCollectMoneyCodeView.swift in Sources */, | 810 | + 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, |
| 811 | + 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, | ||
| 812 | 7C2703362A3AFD3A0061EC50 /* CNLiveEnvironment.swift in Sources */, | 812 | 7C2703362A3AFD3A0061EC50 /* CNLiveEnvironment.swift in Sources */, |
| 813 | 798A44FD2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift in Sources */, | 813 | 798A44FD2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift in Sources */, |
| 814 | 7CD6754F2A2840B9008354C1 /* CNMetaCodeHomePageController.swift in Sources */, | 814 | 7CD6754F2A2840B9008354C1 /* CNMetaCodeHomePageController.swift in Sources */, |
| @@ -838,8 +838,8 @@ | @@ -838,8 +838,8 @@ | ||
| 838 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */, | 838 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */, |
| 839 | 79F4B1182A32C5FA00993C03 /* CNLiveBaseMoel.swift in Sources */, | 839 | 79F4B1182A32C5FA00993C03 /* CNLiveBaseMoel.swift in Sources */, |
| 840 | 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */, | 840 | 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */, |
| 841 | - 7CD6753F2A2740B0008354C1 /* CNTopCollectMoneyRemindView.swift in Sources */, | ||
| 842 | - 7CD6753C2A2740B0008354C1 /* CNBottomPayMoneyRemindView.swift in Sources */, | 841 | + 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */, |
| 842 | + 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */, | ||
| 843 | 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */, | 843 | 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */, |
| 844 | 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift in Sources */, | 844 | 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNBadge.swift in Sources */, |
| 845 | 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */, | 845 | 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */, |
metaCode/Classes/Main/HomePage/View/CNCustomIndexView.swift
| @@ -136,9 +136,9 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | @@ -136,9 +136,9 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | ||
| 136 | return mainView | 136 | return mainView |
| 137 | }() | 137 | }() |
| 138 | 138 | ||
| 139 | - ///收钱view | ||
| 140 | - lazy var collectMoneyCodeView: CNCollectMoneyCodeView = { | ||
| 141 | - let collectionView = CNCollectMoneyCodeView.init(frame: CGRectMake(-25, 0, self.frame.size.width + 50, self.frame.size.height)) | 139 | + ///下滑显示的VIew |
| 140 | + lazy var downSlideView: CNDownSlideView = { | ||
| 141 | + let collectionView = CNDownSlideView.init(frame: CGRectMake(-25, 0, self.frame.size.width + 50, self.frame.size.height)) | ||
| 142 | collectionView.backAction = {[weak self] in | 142 | collectionView.backAction = {[weak self] in |
| 143 | self?.baseScrollView.setContentOffset(CGPoint(x: 0, y: (self!.baseScrollView.height)), animated: true) | 143 | self?.baseScrollView.setContentOffset(CGPoint(x: 0, y: (self!.baseScrollView.height)), animated: true) |
| 144 | self?.superScrollView?.isScrollEnabled = true | 144 | self?.superScrollView?.isScrollEnabled = true |
| @@ -146,33 +146,33 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | @@ -146,33 +146,33 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | ||
| 146 | let time = DispatchTime.now() + 0.5 | 146 | let time = DispatchTime.now() + 0.5 |
| 147 | DispatchQueue.main.asyncAfter(deadline:time, execute: DispatchWorkItem(block: { | 147 | DispatchQueue.main.asyncAfter(deadline:time, execute: DispatchWorkItem(block: { |
| 148 | //下滑提醒View回到初始位置 | 148 | //下滑提醒View回到初始位置 |
| 149 | - self?.topCollectMoneyRemindView.top = -((self?.topCollectMoneyRemindView.height)! + 50) | 149 | + self?.downSlideViewRemindView.top = -((self?.downSlideViewRemindView.height)! + 50) |
| 150 | })) | 150 | })) |
| 151 | 151 | ||
| 152 | } | 152 | } |
| 153 | return collectionView | 153 | return collectionView |
| 154 | }() | 154 | }() |
| 155 | 155 | ||
| 156 | - ///付钱view | ||
| 157 | - lazy var payMoneyCodeView : CNPayMoneyCodeView = { | ||
| 158 | - let payMoneyCodeView = CNPayMoneyCodeView(frame: CGRectMake(-25, self.frame.size.height*2 + 120,self.frame.size.width+50, self.frame.size.height - 120)) | 156 | + ///上滑显示的View |
| 157 | + lazy var upSlideView : CNUpSlideView = { | ||
| 158 | + let upSlideView = CNUpSlideView(frame: CGRectMake(-25, self.frame.size.height*2 + 120,self.frame.size.width+50, self.frame.size.height - 120)) | ||
| 159 | 159 | ||
| 160 | - return payMoneyCodeView | 160 | + return upSlideView |
| 161 | }() | 161 | }() |
| 162 | 162 | ||
| 163 | - ///上滑付钱提醒view | ||
| 164 | - lazy var bottomPayMoneyRemindView: CNBottomPayMoneyRemindView = { | 163 | + ///上滑提醒view |
| 164 | + lazy var upSlideViewRemindView: CNUpSlideViewRemindView = { | ||
| 165 | let W: CGFloat = UIScreen.main.bounds.width-100 | 165 | let W: CGFloat = UIScreen.main.bounds.width-100 |
| 166 | let H: CGFloat = W/2 | 166 | let H: CGFloat = W/2 |
| 167 | - let bottomView = CNBottomPayMoneyRemindView.init(frame: CGRectMake(25, self.height, W,H)) | 167 | + let bottomView = CNUpSlideViewRemindView.init(frame: CGRectMake(25, self.height, W,H)) |
| 168 | bottomView.backgroundColor = UIColor.clear | 168 | bottomView.backgroundColor = UIColor.clear |
| 169 | return bottomView | 169 | return bottomView |
| 170 | }() | 170 | }() |
| 171 | - /// 下滑收钱提醒view | ||
| 172 | - lazy var topCollectMoneyRemindView:CNTopCollectMoneyRemindView = { | 171 | + /// 下滑提醒view |
| 172 | + lazy var downSlideViewRemindView:CNDownSlideViewRemindView = { | ||
| 173 | let W: CGFloat = UIScreen.main.bounds.width-100 | 173 | let W: CGFloat = UIScreen.main.bounds.width-100 |
| 174 | let H: CGFloat = W/2 | 174 | let H: CGFloat = W/2 |
| 175 | - let topView = CNTopCollectMoneyRemindView.init(frame: CGRectMake(25, -H - 50, W,H)) | 175 | + let topView = CNDownSlideViewRemindView.init(frame: CGRectMake(25, -H - 50, W,H)) |
| 176 | topView.backgroundColor = .clear | 176 | topView.backgroundColor = .clear |
| 177 | 177 | ||
| 178 | return topView | 178 | return topView |
| @@ -201,16 +201,16 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | @@ -201,16 +201,16 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | ||
| 201 | 201 | ||
| 202 | // MARK: - 添加UI | 202 | // MARK: - 添加UI |
| 203 | func initUI(){ | 203 | func initUI(){ |
| 204 | - self.addSubview(self.bottomPayMoneyRemindView) | ||
| 205 | - self.addSubview(self.topCollectMoneyRemindView) | 204 | + self.addSubview(self.upSlideViewRemindView) |
| 205 | + self.addSubview(self.downSlideViewRemindView) | ||
| 206 | 206 | ||
| 207 | self.addSubview(self.baseScrollView) | 207 | self.addSubview(self.baseScrollView) |
| 208 | self.addSubview(self.topNavView) | 208 | self.addSubview(self.topNavView) |
| 209 | self.topNavView.setTitleString(title: "志愿者") | 209 | self.topNavView.setTitleString(title: "志愿者") |
| 210 | 210 | ||
| 211 | - self.baseScrollView.addSubview(self.collectMoneyCodeView) | 211 | + self.baseScrollView.addSubview(self.downSlideView) |
| 212 | self.baseScrollView.addSubview(self.mainView) | 212 | self.baseScrollView.addSubview(self.mainView) |
| 213 | - self.baseScrollView.addSubview(self.payMoneyCodeView) | 213 | + self.baseScrollView.addSubview(self.upSlideView) |
| 214 | 214 | ||
| 215 | //默认偏移到中间 | 215 | //默认偏移到中间 |
| 216 | self.baseScrollView.setContentOffset(CGPointMake(0, self.frame.size.height), animated: false) | 216 | self.baseScrollView.setContentOffset(CGPointMake(0, self.frame.size.height), animated: false) |
| @@ -272,36 +272,36 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | @@ -272,36 +272,36 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | ||
| 272 | 272 | ||
| 273 | //当self.baseScrollView的偏移量大于 self.baseScrollView.height时,显示上滑提醒view | 273 | //当self.baseScrollView的偏移量大于 self.baseScrollView.height时,显示上滑提醒view |
| 274 | if(currentOffset > self.baseScrollView.height){ | 274 | if(currentOffset > self.baseScrollView.height){ |
| 275 | - self.bottomPayMoneyRemindView.top = self.height - (currentOffset - self.baseScrollView.height)*1.5 | 275 | + self.upSlideViewRemindView.top = self.height - (currentOffset - self.baseScrollView.height)*1.5 |
| 276 | } | 276 | } |
| 277 | - //上滑滑动到临近值,让bottomPayMoneyRemindView位置一直停留在底部,并慢慢消失 | ||
| 278 | - if (self.bottomPayMoneyRemindView.top < self.height - self.bottomPayMoneyRemindView.height) { | ||
| 279 | - /**让bottomPayMoneyRemindView位置一直停留在底部*/ | ||
| 280 | - self.bottomPayMoneyRemindView.top = self.height - self.bottomPayMoneyRemindView.height | 277 | + //上滑滑动到临近值,让upSlideViewRemindView位置一直停留在底部,并慢慢消失 |
| 278 | + if (self.upSlideViewRemindView.top < self.height - self.upSlideViewRemindView.height) { | ||
| 279 | + /**让upSlideViewRemindView位置一直停留在底部*/ | ||
| 280 | + self.upSlideViewRemindView.top = self.height - self.upSlideViewRemindView.height | ||
| 281 | 281 | ||
| 282 | - /**渐渐隐藏bottomPayMoneyRemindView,缓冲距离为20*/ | ||
| 283 | - let bottomPayMoneyRemindViewMaxOffset: CGFloat = self.baseScrollView.height+self.bottomPayMoneyRemindView.height | ||
| 284 | - self.bottomPayMoneyRemindView.alpha = (20-(currentOffset - bottomPayMoneyRemindViewMaxOffset))/20.00 | 282 | + /**渐渐隐藏upSlideViewRemindView,缓冲距离为20*/ |
| 283 | + let upSlideViewRemindViewMaxOffset: CGFloat = self.baseScrollView.height+self.upSlideViewRemindView.height | ||
| 284 | + self.upSlideViewRemindView.alpha = (20-(currentOffset - upSlideViewRemindViewMaxOffset))/20.00 | ||
| 285 | 285 | ||
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | //当self.baseScrollView的偏移量小于 self.baseScrollView.height时,显示下滑提醒view | 288 | //当self.baseScrollView的偏移量小于 self.baseScrollView.height时,显示下滑提醒view |
| 289 | if(currentOffset < self.baseScrollView.height){ | 289 | if(currentOffset < self.baseScrollView.height){ |
| 290 | - self.topCollectMoneyRemindView.bottom = (self.baseScrollView.height - currentOffset)*1.5 | 290 | + self.downSlideViewRemindView.bottom = (self.baseScrollView.height - currentOffset)*1.5 |
| 291 | } | 291 | } |
| 292 | - //下滑滑动到临近值,让topCollectMoneyRemindView位置一直停留在顶部,并慢慢消失 | ||
| 293 | - if (self.topCollectMoneyRemindView.bottom > self.topCollectMoneyRemindView.height) { | 292 | + //下滑滑动到临近值,让downSlideViewRemindView位置一直停留在顶部,并慢慢消失 |
| 293 | + if (self.downSlideViewRemindView.bottom > self.downSlideViewRemindView.height) { | ||
| 294 | 294 | ||
| 295 | - /**让topCollectMoneyRemindView位置一直停留在底部*/ | ||
| 296 | - self.topCollectMoneyRemindView.bottom = self.topCollectMoneyRemindView.height | 295 | + /**让downSlideViewRemindView位置一直停留在底部*/ |
| 296 | + self.downSlideViewRemindView.bottom = self.downSlideViewRemindView.height | ||
| 297 | 297 | ||
| 298 | - /**渐渐隐藏topCollectMoneyRemindView,缓冲距离为20*/ | ||
| 299 | - let topCollectMoneyRemindViewMinOffset: CGFloat = self.baseScrollView.height-self.topCollectMoneyRemindView.height | ||
| 300 | - self.topCollectMoneyRemindView.alpha = (20-(topCollectMoneyRemindViewMinOffset - currentOffset))/20.00 | 298 | + /**渐渐隐藏downSlideViewRemindView,缓冲距离为20*/ |
| 299 | + let downSlideViewRemindViewMinOffset: CGFloat = self.baseScrollView.height-self.downSlideViewRemindView.height | ||
| 300 | + self.downSlideViewRemindView.alpha = (20-(downSlideViewRemindViewMinOffset - currentOffset))/20.00 | ||
| 301 | 301 | ||
| 302 | - //让系统及时更新topCollectMoneyRemindView | ||
| 303 | -// self.topCollectMoneyRemindView.setNeedsLayout() | ||
| 304 | -// self.topCollectMoneyRemindView.layoutIfNeeded() | 302 | + //让系统及时更新downSlideViewRemindView |
| 303 | +// self.downSlideViewRemindView.setNeedsLayout() | ||
| 304 | +// self.downSlideViewRemindView.layoutIfNeeded() | ||
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | 307 | ||
| @@ -331,10 +331,10 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | @@ -331,10 +331,10 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | ||
| 331 | self.topNavView.alpha = 0 | 331 | self.topNavView.alpha = 0 |
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | - //隐藏collectMoneyCodeView的bottomView | 334 | + //隐藏downSlideView的bottomView |
| 335 | if scrollView.contentOffset.y > 10{ | 335 | if scrollView.contentOffset.y > 10{ |
| 336 | - self.collectMoneyCodeView.bottomView.isHidden = true | ||
| 337 | - self.collectMoneyCodeView.contentView.backgroundColor = .clear | 336 | + self.downSlideView.bottomView.isHidden = true |
| 337 | + self.downSlideView.contentView.backgroundColor = .clear | ||
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | delegate?.customIndexViewDidScroll(scrollView: self.baseScrollView) | 340 | delegate?.customIndexViewDidScroll(scrollView: self.baseScrollView) |
| @@ -360,9 +360,9 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | @@ -360,9 +360,9 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | ||
| 360 | 360 | ||
| 361 | 361 | ||
| 362 | if scrollView.contentOffset.y == 0{ | 362 | if scrollView.contentOffset.y == 0{ |
| 363 | - //滚动到第一页,显示collectMoneyCodeView的底部view | ||
| 364 | - self.collectMoneyCodeView.bottomView.isHidden = false | ||
| 365 | - self.collectMoneyCodeView.contentView.backgroundColor = KVCBackgroupColor | 363 | + //滚动到第一页,显示downSlideView的底部view |
| 364 | + self.downSlideView.bottomView.isHidden = false | ||
| 365 | + self.downSlideView.contentView.backgroundColor = KVCBackgroupColor | ||
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | 368 | ||
| @@ -370,7 +370,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | @@ -370,7 +370,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | ||
| 370 | self.bringSubviewToFront(self.topNavView) | 370 | self.bringSubviewToFront(self.topNavView) |
| 371 | 371 | ||
| 372 | //下滑提醒View回到初始位置 | 372 | //下滑提醒View回到初始位置 |
| 373 | - self.topCollectMoneyRemindView.top = -(self.topCollectMoneyRemindView.height + 50) | 373 | + self.downSlideViewRemindView.top = -(self.downSlideViewRemindView.height + 50) |
| 374 | 374 | ||
| 375 | //外部代理 | 375 | //外部代理 |
| 376 | self.delegate?.customIndexViewDidEndScroll(scrollView: scrollView) | 376 | self.delegate?.customIndexViewDidEndScroll(scrollView: scrollView) |
metaCode/Classes/Main/HomePage/View/CNCollectMoneyCodeView.swift renamed to metaCode/Classes/Main/HomePage/View/CNDownSlideView.swift
| 1 | // | 1 | // |
| 2 | -// CNCollectMoneyCodeView.swift | 2 | +// CNDownSlideView.swift |
| 3 | // metaCode | 3 | // metaCode |
| 4 | // | 4 | // |
| 5 | // Created by daojian on 2023/5/30. | 5 | // Created by daojian on 2023/5/30. |
| @@ -11,8 +11,8 @@ import YYCategories | @@ -11,8 +11,8 @@ import YYCategories | ||
| 11 | 11 | ||
| 12 | typealias backBlock = ()->Void; | 12 | typealias backBlock = ()->Void; |
| 13 | 13 | ||
| 14 | -///收钱码View | ||
| 15 | -class CNCollectMoneyCodeView:UIView{ | 14 | +///下滑显示的View |
| 15 | +class CNDownSlideView:UIView{ | ||
| 16 | //返回首页 | 16 | //返回首页 |
| 17 | var backAction:backBlock? | 17 | var backAction:backBlock? |
| 18 | 18 |
metaCode/Classes/Main/HomePage/View/CNTopCollectMoneyRemindView.swift renamed to metaCode/Classes/Main/HomePage/View/CNDownSlideViewRemindView.swift
| 1 | // | 1 | // |
| 2 | -// CNTopCollectMoneyRemindView.swift | 2 | +// CNDownSlideViewRemindView.swift |
| 3 | // metaCode | 3 | // metaCode |
| 4 | // | 4 | // |
| 5 | // Created by daojian on 2023/5/31. | 5 | // Created by daojian on 2023/5/31. |
| @@ -8,8 +8,8 @@ | @@ -8,8 +8,8 @@ | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | import YYCategories | 9 | import YYCategories |
| 10 | 10 | ||
| 11 | -///收钱下拉显示提醒View | ||
| 12 | -class CNTopCollectMoneyRemindView : UIView{ | 11 | +///下滑显示提醒View |
| 12 | +class CNDownSlideViewRemindView : UIView{ | ||
| 13 | override init(frame: CGRect) { | 13 | override init(frame: CGRect) { |
| 14 | super.init(frame: frame) | 14 | super.init(frame: frame) |
| 15 | self.initUI() | 15 | self.initUI() |
metaCode/Classes/Main/HomePage/View/CNPayMoneyCodeView.swift renamed to metaCode/Classes/Main/HomePage/View/CNUpSlideView.swift
| 1 | // | 1 | // |
| 2 | -// CNPayMoneyCodeView.swift | 2 | +// CNUpSlideView.swift |
| 3 | // metaCode | 3 | // metaCode |
| 4 | // | 4 | // |
| 5 | // Created by daojian on 2023/5/31. | 5 | // Created by daojian on 2023/5/31. |
| @@ -9,8 +9,8 @@ import Foundation | @@ -9,8 +9,8 @@ import Foundation | ||
| 9 | import YYCategories | 9 | import YYCategories |
| 10 | import WebKit | 10 | import WebKit |
| 11 | 11 | ||
| 12 | -///付钱码view | ||
| 13 | -class CNPayMoneyCodeView:UIView{ | 12 | +///上滑显示的VIew |
| 13 | +class CNUpSlideView:UIView{ | ||
| 14 | override init(frame: CGRect) { | 14 | override init(frame: CGRect) { |
| 15 | super.init(frame: frame) | 15 | super.init(frame: frame) |
| 16 | self.initUI() | 16 | self.initUI() |
metaCode/Classes/Main/HomePage/View/CNBottomPayMoneyRemindView.swift renamed to metaCode/Classes/Main/HomePage/View/CNUpSlideViewRemindView.swift
| 1 | // | 1 | // |
| 2 | -// CNBottomPayMoneyRemindView.swift | 2 | +// CNUpSlideViewRemindView.swift |
| 3 | // metaCode | 3 | // metaCode |
| 4 | // | 4 | // |
| 5 | // Created by daojian on 2023/5/31. | 5 | // Created by daojian on 2023/5/31. |
| @@ -8,8 +8,8 @@ | @@ -8,8 +8,8 @@ | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | import YYCategories | 9 | import YYCategories |
| 10 | 10 | ||
| 11 | -/// 底部付钱上拉显示提醒View | ||
| 12 | -class CNBottomPayMoneyRemindView:UIView{ | 11 | +/// 上拉显示提醒View |
| 12 | +class CNUpSlideViewRemindView:UIView{ | ||
| 13 | 13 | ||
| 14 | override init(frame: CGRect) { | 14 | override init(frame: CGRect) { |
| 15 | super.init(frame: frame) | 15 | super.init(frame: frame) |