Commit 1a3c609c894da0a5da5d37987b3b45cdd50c6a06
1 parent
41ae675a
首页desc背景图
Showing
4 changed files
with
41 additions
and
1 deletions
metaCode/Classes/Main/HomePage/View/CNMainView.swift
| @@ -44,6 +44,15 @@ class CNFrontMainView : UIView{ | @@ -44,6 +44,15 @@ class CNFrontMainView : UIView{ | ||
| 44 | return iDCardView | 44 | return iDCardView |
| 45 | }() | 45 | }() |
| 46 | 46 | ||
| 47 | + /// 已认证-身份卡片 | ||
| 48 | + lazy var textViewBgImgView:UIImageView = { | ||
| 49 | + | ||
| 50 | + let textViewBgImgView:UIImageView = UIImageView() | ||
| 51 | + textViewBgImgView.clipsToBounds = true | ||
| 52 | + textViewBgImgView.layer.cornerRadius = 20 | ||
| 53 | + return textViewBgImgView | ||
| 54 | + }() | ||
| 55 | + | ||
| 47 | //未认证下 textview | 56 | //未认证下 textview |
| 48 | lazy var textView: UITextView = { | 57 | lazy var textView: UITextView = { |
| 49 | let textView = UITextView.init() | 58 | let textView = UITextView.init() |
| @@ -57,6 +66,7 @@ class CNFrontMainView : UIView{ | @@ -57,6 +66,7 @@ class CNFrontMainView : UIView{ | ||
| 57 | textView.clipsToBounds = true | 66 | textView.clipsToBounds = true |
| 58 | textView.layer.cornerRadius = 14 | 67 | textView.layer.cornerRadius = 14 |
| 59 | textView.isUserInteractionEnabled = false | 68 | textView.isUserInteractionEnabled = false |
| 69 | + textView.backgroundColor = .clear | ||
| 60 | return textView | 70 | return textView |
| 61 | }() | 71 | }() |
| 62 | 72 | ||
| @@ -80,6 +90,14 @@ class CNFrontMainView : UIView{ | @@ -80,6 +90,14 @@ class CNFrontMainView : UIView{ | ||
| 80 | contentView.backgroundColor = UIColor.white | 90 | contentView.backgroundColor = UIColor.white |
| 81 | contentView.clipsToBounds = true | 91 | contentView.clipsToBounds = true |
| 82 | contentView.layer.cornerRadius = 20 | 92 | contentView.layer.cornerRadius = 20 |
| 93 | + contentView.addSubview(self.textViewBgImgView) | ||
| 94 | + textViewBgImgView.snp.makeConstraints { make in | ||
| 95 | + make.top.equalToSuperview() | ||
| 96 | + make.left.equalToSuperview() | ||
| 97 | + make.right.equalToSuperview() | ||
| 98 | + make.bottom.equalToSuperview() | ||
| 99 | + } | ||
| 100 | + | ||
| 83 | contentView.addSubview(self.addStandBtn) | 101 | contentView.addSubview(self.addStandBtn) |
| 84 | addStandBtn.snp.makeConstraints { make in | 102 | addStandBtn.snp.makeConstraints { make in |
| 85 | make.centerX.equalToSuperview() | 103 | make.centerX.equalToSuperview() |
| @@ -123,7 +141,7 @@ class CNFrontMainView : UIView{ | @@ -123,7 +141,7 @@ class CNFrontMainView : UIView{ | ||
| 123 | contentView.isHidden = false | 141 | contentView.isHidden = false |
| 124 | textView.text = newValue!.description | 142 | textView.text = newValue!.description |
| 125 | addStandBtn.backgroundColor = HexColor(newValue!.backgroundColor) | 143 | addStandBtn.backgroundColor = HexColor(newValue!.backgroundColor) |
| 126 | - textView.backgroundColor = HexColor(newValue!.backgroundColor, alpha: 0.1) | 144 | + textViewBgImgView.kf.setImage(with: URL(string: _idModel!.descBackgroundImg), placeholder: UIImage(named: "homepage_desc_bgImg")) |
| 127 | } | 145 | } |
| 128 | } | 146 | } |
| 129 | } | 147 | } |
metaCode/Supporting Files/Assets.xcassets/Home/homepage_desc_bgImg.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "homepage_desc_bgImg@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "homepage_desc_bgImg@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/Home/homepage_desc_bgImg.imageset/homepage_desc_bgImg@2x.png
0 → 100644
95.9 KB
metaCode/Supporting Files/Assets.xcassets/Home/homepage_desc_bgImg.imageset/homepage_desc_bgImg@3x.png
0 → 100644
311 KB