Commit 12af2005 authored by David黄金龙's avatar David黄金龙

替换首页 图片

parent cb152d70
...@@ -40,33 +40,49 @@ class YHHomeKingKongBlockItem: UIView { ...@@ -40,33 +40,49 @@ class YHHomeKingKongBlockItem: UIView {
} }
} }
let radio : CGFloat = YHHomeKingKongBlockView.viewH / 71.0 let radio : CGFloat = YHHomeKingKongBlockView.viewH / 76.0
lazy var bkgImgV: UIImageView = {
let imageV = UIImageView()
imageV.contentMode = .scaleAspectFill
imageV.clipsToBounds = true
return imageV
}()
} }
private extension YHHomeKingKongBlockItem { private extension YHHomeKingKongBlockItem {
func initView() { func initView() {
backgroundColor = UIColor(hex: 0xF8FAFB, alpha: 1.0) backgroundColor = UIColor(hex: 0xF8FAFB, alpha: 1.0)
addSubview(iconV) // addSubview(iconV)
iconV.snp.makeConstraints { make in // iconV.snp.makeConstraints { make in
make.centerX.equalToSuperview() // make.centerX.equalToSuperview()
make.width.height.equalTo(31) // make.width.height.equalTo(31)
make.top.equalTo(10 * radio) // make.top.equalTo(10 * radio)
} // }
//
// addSubview(subtitleLable)
// subtitleLable.snp.makeConstraints { make in
// make.centerX.equalToSuperview()
// make.left.equalTo(4)
// make.right.equalTo(-4)
// make.height.equalTo(17)
// make.bottom.equalTo(-8 * radio)
// }
addSubview(subtitleLable)
subtitleLable.snp.makeConstraints { make in addSubview(bkgImgV)
make.centerX.equalToSuperview() bkgImgV.snp.makeConstraints { make in
make.left.equalTo(4) make.edges.equalToSuperview()
make.right.equalTo(-4)
make.height.equalTo(17)
make.bottom.equalTo(-8 * radio)
} }
} }
func updateUI() { func updateUI() {
guard let dataModel = dataModel else { return } guard let dataModel = dataModel else { return }
iconV.image = UIImage(named: dataModel.iconName) // iconV.image = UIImage(named: dataModel.iconName)
subtitleLable.text = dataModel.title // subtitleLable.text = dataModel.title
bkgImgV.image = UIImage(named: dataModel.iconName)
} }
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
import UIKit import UIKit
class YHHomeKingKongBlockView: UIView { class YHHomeKingKongBlockView: UIView {
static let viewH : CGFloat = (KScreenWidth - 20.0 * 2 - 17.0 * 3) / 4.0 static let viewH : CGFloat = (KScreenWidth - 20.0 * 2 - 10.0 * 3) / 4.0
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
initView() initView()
...@@ -29,7 +29,7 @@ class YHHomeKingKongBlockView: UIView { ...@@ -29,7 +29,7 @@ class YHHomeKingKongBlockView: UIView {
private extension YHHomeKingKongBlockView { private extension YHHomeKingKongBlockView {
func initView() { func initView() {
let itemGap : CGFloat = 17.0 let itemGap : CGFloat = 10.0
var offsetX : CGFloat = 0 var offsetX : CGFloat = 0
for (index,item) in arrData.enumerated() { for (index,item) in arrData.enumerated() {
let view = YHHomeKingKongBlockItem() let view = YHHomeKingKongBlockItem()
......
...@@ -286,7 +286,7 @@ private extension YHOrderTipsView { ...@@ -286,7 +286,7 @@ private extension YHOrderTipsView {
make.left.equalTo(iconImageV.snp.right).offset(6) make.left.equalTo(iconImageV.snp.right).offset(6)
} }
let aa: ASAttributedString = .init("智能", .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor(hex: 0x2465DE, alpha: 1.0))) let aa: ASAttributedString = .init("智能", .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("助理", .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.mainTextColor)) let bb: ASAttributedString = .init("助理", .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.mainTextColor))
lableTip.attributed.text = aa+bb lableTip.attributed.text = aa+bb
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Group 2033194163@2x.png", "filename" : "办理攻略@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Group 2033194163@3x.png", "filename" : "办理攻略@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Frame 1@2x.png", "filename" : "客户心声@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Frame 1@3x.png", "filename" : "客户心声@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Frame 1@2x.png", "filename" : "香港办事@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Frame 1@3x.png", "filename" : "香港办事@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Rectangle 346240924@2x.png", "filename" : "消息入口背景@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Rectangle 346240924@3x.png", "filename" : "消息入口背景@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
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