Commit 1b01b94b1ea45540c201462f26c62b97630c2a18

Authored by “张旭”
1 parent 489f0b29

上下滑位置 ,三个认证位置

metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
@@ -59,32 +59,32 @@ class CNFrontMainView : UIView{ @@ -59,32 +59,32 @@ class CNFrontMainView : UIView{
59 frontDescContentView.addSubview(self.addStandBtn) 59 frontDescContentView.addSubview(self.addStandBtn)
60 addStandBtn.snp.makeConstraints { make in 60 addStandBtn.snp.makeConstraints { make in
61 make.centerX.equalToSuperview() 61 make.centerX.equalToSuperview()
62 - make.bottom.equalToSuperview().offset(-30) 62 + make.bottom.equalToSuperview().offset(-62)
63 make.width.equalTo(150) 63 make.width.equalTo(150)
64 - make.height.equalTo(39) 64 + make.height.equalTo(36)
65 } 65 }
66 66
67 frontDescContentView.addSubview(self.personalStandBtn) 67 frontDescContentView.addSubview(self.personalStandBtn)
68 personalStandBtn.snp.makeConstraints { make in 68 personalStandBtn.snp.makeConstraints { make in
69 make.right.equalToSuperview().offset(-self.width/2) 69 make.right.equalToSuperview().offset(-self.width/2)
70 - make.bottom.equalToSuperview().offset(-45) 70 + make.bottom.equalTo(self.addStandBtn.snp.bottom)
71 make.width.equalTo(120) 71 make.width.equalTo(120)
72 - make.height.equalTo(36) 72 + make.height.equalTo(self.addStandBtn.snp.height)
73 } 73 }
74 frontDescContentView.addSubview(self.enterpriseStandBtn) 74 frontDescContentView.addSubview(self.enterpriseStandBtn)
75 enterpriseStandBtn.snp.makeConstraints { make in 75 enterpriseStandBtn.snp.makeConstraints { make in
76 make.left.equalTo(self.personalStandBtn.snp.right) 76 make.left.equalTo(self.personalStandBtn.snp.right)
77 - make.bottom.equalToSuperview().offset(-45) 77 + make.bottom.equalTo(self.addStandBtn.snp.bottom)
78 make.width.equalTo(120) 78 make.width.equalTo(120)
79 - make.height.equalTo(36) 79 + make.height.equalTo(self.addStandBtn.snp.height)
80 } 80 }
81 81
82 frontDescContentView.addSubview(self.unStandBtnBgView) 82 frontDescContentView.addSubview(self.unStandBtnBgView)
83 unStandBtnBgView.snp.makeConstraints { make in 83 unStandBtnBgView.snp.makeConstraints { make in
84 make.left.equalToSuperview().offset(30) 84 make.left.equalToSuperview().offset(30)
85 - make.bottom.equalToSuperview().offset(-45) 85 + make.bottom.equalTo(self.addStandBtn.snp.bottom)
86 make.width.equalTo(self.width-60) 86 make.width.equalTo(self.width-60)
87 - make.height.equalTo(36) 87 + make.height.equalTo(self.addStandBtn.snp.height)
88 } 88 }
89 89
90 90
@@ -206,21 +206,21 @@ class CNFrontMainView : UIView{ @@ -206,21 +206,21 @@ class CNFrontMainView : UIView{
206 make.left.equalToSuperview() 206 make.left.equalToSuperview()
207 make.top.equalToSuperview() 207 make.top.equalToSuperview()
208 make.width.equalTo((self.width-60)/3) 208 make.width.equalTo((self.width-60)/3)
209 - make.height.equalTo(36) 209 + make.height.equalToSuperview()
210 } 210 }
211 unStandBtnBgView.addSubview(self.StandBtn2) 211 unStandBtnBgView.addSubview(self.StandBtn2)
212 StandBtn2.snp.makeConstraints { make in 212 StandBtn2.snp.makeConstraints { make in
213 make.centerX.equalToSuperview() 213 make.centerX.equalToSuperview()
214 make.top.equalToSuperview() 214 make.top.equalToSuperview()
215 make.width.equalTo(self.StandBtn1.snp.width) 215 make.width.equalTo(self.StandBtn1.snp.width)
216 - make.height.equalTo(36) 216 + make.height.equalToSuperview()
217 } 217 }
218 unStandBtnBgView.addSubview(self.StandBtn3) 218 unStandBtnBgView.addSubview(self.StandBtn3)
219 StandBtn3.snp.makeConstraints { make in 219 StandBtn3.snp.makeConstraints { make in
220 make.right.equalToSuperview() 220 make.right.equalToSuperview()
221 make.top.equalToSuperview() 221 make.top.equalToSuperview()
222 make.width.equalTo(self.StandBtn1.snp.width) 222 make.width.equalTo(self.StandBtn1.snp.width)
223 - make.height.equalTo(36) 223 + make.height.equalToSuperview()
224 } 224 }
225 225
226 unStandBtnBgView.addSubview(self.line1View) 226 unStandBtnBgView.addSubview(self.line1View)
@@ -268,12 +268,14 @@ class CNFrontMainView : UIView{ @@ -268,12 +268,14 @@ class CNFrontMainView : UIView{
268 lazy var upMoreGIF: UIImageView = { 268 lazy var upMoreGIF: UIImageView = {
269 let upMoreGIF = UIImageView() 269 let upMoreGIF = UIImageView()
270 upMoreGIF.frame = CGRect(x: self.width - 50, y: 0, width: 50, height: 30) 270 upMoreGIF.frame = CGRect(x: self.width - 50, y: 0, width: 50, height: 30)
  271 + upMoreGIF.contentMode = .scaleAspectFit
271 return upMoreGIF 272 return upMoreGIF
272 }() 273 }()
273 //下滑更多Gif 274 //下滑更多Gif
274 lazy var downMoreGIF: UIImageView = { 275 lazy var downMoreGIF: UIImageView = {
275 let downMoreGIF = UIImageView() 276 let downMoreGIF = UIImageView()
276 downMoreGIF.frame = CGRect(x: self.width - 50, y: 0, width: 96, height: 30) 277 downMoreGIF.frame = CGRect(x: self.width - 50, y: 0, width: 96, height: 30)
  278 + downMoreGIF.contentMode = .scaleAspectFit
277 return downMoreGIF 279 return downMoreGIF
278 }() 280 }()
279 281
@@ -352,22 +354,11 @@ class CNFrontMainView : UIView{ @@ -352,22 +354,11 @@ class CNFrontMainView : UIView{
352 self.upMoreGIF.removeFromSuperview() 354 self.upMoreGIF.removeFromSuperview()
353 } 355 }
354 frontCardContentView.addSubview(self.upMoreGIF) 356 frontCardContentView.addSubview(self.upMoreGIF)
355 - upMoreGIF.snp.makeConstraints { make in  
356 - make.top.equalToSuperview().offset(5)  
357 - make.right.equalToSuperview().offset(-self.width/2+24)  
358 - make.width.equalTo(48)  
359 - make.height.equalTo(30)  
360 - }  
361 if frontCardContentView.contains(self.downMoreGIF){ 357 if frontCardContentView.contains(self.downMoreGIF){
362 self.downMoreGIF.removeFromSuperview() 358 self.downMoreGIF.removeFromSuperview()
363 } 359 }
364 frontCardContentView.addSubview(self.downMoreGIF) 360 frontCardContentView.addSubview(self.downMoreGIF)
365 - downMoreGIF.snp.makeConstraints { make in  
366 - make.top.equalTo(self.iDCardView.snp.bottom).offset((45-30)/2.0)  
367 - make.centerX.equalToSuperview()  
368 - make.width.equalTo(96)  
369 - make.height.equalTo(30)  
370 - } 361 + self.setUpMoreGIFAndDownMoreGIF()
371 //上滑 下滑引导gif 362 //上滑 下滑引导gif
372 upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg)) 363 upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg))
373 downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg)) 364 downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg))
@@ -488,22 +479,12 @@ class CNFrontMainView : UIView{ @@ -488,22 +479,12 @@ class CNFrontMainView : UIView{
488 self.upMoreGIF.removeFromSuperview() 479 self.upMoreGIF.removeFromSuperview()
489 } 480 }
490 frontDescContentView.addSubview(self.upMoreGIF) 481 frontDescContentView.addSubview(self.upMoreGIF)
491 - upMoreGIF.snp.makeConstraints { make in  
492 - make.top.equalToSuperview().offset(5)  
493 - make.right.equalToSuperview().offset(-self.width/2+24)  
494 - make.width.equalTo(48)  
495 - make.height.equalTo(30)  
496 - }  
497 if frontDescContentView.contains(self.downMoreGIF){ 482 if frontDescContentView.contains(self.downMoreGIF){
498 self.downMoreGIF.removeFromSuperview() 483 self.downMoreGIF.removeFromSuperview()
499 } 484 }
500 frontDescContentView.addSubview(self.downMoreGIF) 485 frontDescContentView.addSubview(self.downMoreGIF)
501 - downMoreGIF.snp.makeConstraints { make in  
502 - make.top.equalTo(self.personalStandBtn.snp.bottom).offset((45-30)/2.0)  
503 - make.centerX.equalTo(self.personalStandBtn.snp.right)  
504 - make.width.equalTo(96)  
505 - make.height.equalTo(30)  
506 - } 486 +
  487 + self.setUpMoreGIFAndDownMoreGIF()
507 //上滑 下滑引导gif 488 //上滑 下滑引导gif
508 upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg)) 489 upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg))
509 downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg)) 490 downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg))
@@ -516,6 +497,22 @@ class CNFrontMainView : UIView{ @@ -516,6 +497,22 @@ class CNFrontMainView : UIView{
516 } 497 }
517 } 498 }
518 499
  500 + func setUpMoreGIFAndDownMoreGIF(){
  501 + upMoreGIF.snp.makeConstraints { make in
  502 + make.top.equalToSuperview().offset(20)
  503 + make.centerX.equalToSuperview()
  504 + make.width.equalTo(96)
  505 + make.height.equalTo(30)
  506 + }
  507 + downMoreGIF.snp.makeConstraints { make in
  508 + make.bottom.equalToSuperview().offset(-19)
  509 + make.centerX.equalToSuperview()
  510 + make.width.equalTo(96)
  511 + make.height.equalTo(30)
  512 + }
  513 + }
  514 +
  515 +
519 let unStandBtnBgViewLayer = "unStandBtnBgViewLayer" 516 let unStandBtnBgViewLayer = "unStandBtnBgViewLayer"
520 func setUnStandBtnBgViewLayer(startHex:String,endHex:String){ 517 func setUnStandBtnBgViewLayer(startHex:String,endHex:String){
521 let payLayer = self.subLayer(name: unStandBtnBgViewLayer, viewLayer: self.unStandBtnBgView.layer) 518 let payLayer = self.subLayer(name: unStandBtnBgViewLayer, viewLayer: self.unStandBtnBgView.layer)