Commit 1b01b94b1ea45540c201462f26c62b97630c2a18

Authored by “张旭”
1 parent 489f0b29

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

metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
... ... @@ -59,32 +59,32 @@ class CNFrontMainView : UIView{
59 59 frontDescContentView.addSubview(self.addStandBtn)
60 60 addStandBtn.snp.makeConstraints { make in
61 61 make.centerX.equalToSuperview()
62   - make.bottom.equalToSuperview().offset(-30)
  62 + make.bottom.equalToSuperview().offset(-62)
63 63 make.width.equalTo(150)
64   - make.height.equalTo(39)
  64 + make.height.equalTo(36)
65 65 }
66 66  
67 67 frontDescContentView.addSubview(self.personalStandBtn)
68 68 personalStandBtn.snp.makeConstraints { make in
69 69 make.right.equalToSuperview().offset(-self.width/2)
70   - make.bottom.equalToSuperview().offset(-45)
  70 + make.bottom.equalTo(self.addStandBtn.snp.bottom)
71 71 make.width.equalTo(120)
72   - make.height.equalTo(36)
  72 + make.height.equalTo(self.addStandBtn.snp.height)
73 73 }
74 74 frontDescContentView.addSubview(self.enterpriseStandBtn)
75 75 enterpriseStandBtn.snp.makeConstraints { make in
76 76 make.left.equalTo(self.personalStandBtn.snp.right)
77   - make.bottom.equalToSuperview().offset(-45)
  77 + make.bottom.equalTo(self.addStandBtn.snp.bottom)
78 78 make.width.equalTo(120)
79   - make.height.equalTo(36)
  79 + make.height.equalTo(self.addStandBtn.snp.height)
80 80 }
81 81  
82 82 frontDescContentView.addSubview(self.unStandBtnBgView)
83 83 unStandBtnBgView.snp.makeConstraints { make in
84 84 make.left.equalToSuperview().offset(30)
85   - make.bottom.equalToSuperview().offset(-45)
  85 + make.bottom.equalTo(self.addStandBtn.snp.bottom)
86 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 206 make.left.equalToSuperview()
207 207 make.top.equalToSuperview()
208 208 make.width.equalTo((self.width-60)/3)
209   - make.height.equalTo(36)
  209 + make.height.equalToSuperview()
210 210 }
211 211 unStandBtnBgView.addSubview(self.StandBtn2)
212 212 StandBtn2.snp.makeConstraints { make in
213 213 make.centerX.equalToSuperview()
214 214 make.top.equalToSuperview()
215 215 make.width.equalTo(self.StandBtn1.snp.width)
216   - make.height.equalTo(36)
  216 + make.height.equalToSuperview()
217 217 }
218 218 unStandBtnBgView.addSubview(self.StandBtn3)
219 219 StandBtn3.snp.makeConstraints { make in
220 220 make.right.equalToSuperview()
221 221 make.top.equalToSuperview()
222 222 make.width.equalTo(self.StandBtn1.snp.width)
223   - make.height.equalTo(36)
  223 + make.height.equalToSuperview()
224 224 }
225 225  
226 226 unStandBtnBgView.addSubview(self.line1View)
... ... @@ -268,12 +268,14 @@ class CNFrontMainView : UIView{
268 268 lazy var upMoreGIF: UIImageView = {
269 269 let upMoreGIF = UIImageView()
270 270 upMoreGIF.frame = CGRect(x: self.width - 50, y: 0, width: 50, height: 30)
  271 + upMoreGIF.contentMode = .scaleAspectFit
271 272 return upMoreGIF
272 273 }()
273 274 //下滑更多Gif
274 275 lazy var downMoreGIF: UIImageView = {
275 276 let downMoreGIF = UIImageView()
276 277 downMoreGIF.frame = CGRect(x: self.width - 50, y: 0, width: 96, height: 30)
  278 + downMoreGIF.contentMode = .scaleAspectFit
277 279 return downMoreGIF
278 280 }()
279 281  
... ... @@ -352,22 +354,11 @@ class CNFrontMainView : UIView{
352 354 self.upMoreGIF.removeFromSuperview()
353 355 }
354 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 357 if frontCardContentView.contains(self.downMoreGIF){
362 358 self.downMoreGIF.removeFromSuperview()
363 359 }
364 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 362 //上滑 下滑引导gif
372 363 upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg))
373 364 downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg))
... ... @@ -488,22 +479,12 @@ class CNFrontMainView : UIView{
488 479 self.upMoreGIF.removeFromSuperview()
489 480 }
490 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 482 if frontDescContentView.contains(self.downMoreGIF){
498 483 self.downMoreGIF.removeFromSuperview()
499 484 }
500 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 488 //上滑 下滑引导gif
508 489 upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg))
509 490 downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg))
... ... @@ -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 516 let unStandBtnBgViewLayer = "unStandBtnBgViewLayer"
520 517 func setUnStandBtnBgViewLayer(startHex:String,endHex:String){
521 518 let payLayer = self.subLayer(name: unStandBtnBgViewLayer, viewLayer: self.unStandBtnBgView.layer)
... ...