Commit fd2c8c81 authored by David黄金龙's avatar David黄金龙

4 大金刚区

parent 0ea6f74d
...@@ -65,6 +65,6 @@ private extension YHHomeHeadView { ...@@ -65,6 +65,6 @@ private extension YHHomeHeadView {
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.height.equalTo(YHHomeKingKongBlockView.viewH) make.height.equalTo(YHHomeKingKongBlockView.viewH)
} }
homeKingKongBlock.backgroundColor = .purple // homeKingKongBlock.backgroundColor = .purple
} }
} }
...@@ -9,13 +9,63 @@ ...@@ -9,13 +9,63 @@
import UIKit import UIKit
class YHHomeKingKongBlockItem: UIView { class YHHomeKingKongBlockItem: UIView {
override init(frame: CGRect) {
/* super.init(frame: frame)
// Only override draw() if you perform custom drawing. initView()
// An empty implementation adversely affects performance during animation. }
override func draw(_ rect: CGRect) {
// Drawing code required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var iconV: UIImageView = {
let imageV = UIImageView()
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var subtitleLable:UILabel = {
let label = UILabel()
label.text = "去香港"
label.textColor = UIColor(hex: 0x94A3B8, alpha: 1.0)
label.font = UIFont.PFSC_M(ofSize: 12)
label.lineBreakMode = .byTruncatingMiddle
label.textAlignment = .center
// label.minimumScaleFactor = 0.5
return label
}()
var dataModel : YHHomeKingKongBlockModel? {
didSet {
updateUI()
}
} }
*/ }
private extension YHHomeKingKongBlockItem {
func initView() {
backgroundColor = UIColor(hex: 0xF8FAFB, alpha: 1.0)
addSubview(iconV)
iconV.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.width.height.equalTo(31)
make.top.equalTo(10)
}
addSubview(subtitleLable)
subtitleLable.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.left.equalTo(4)
make.right.equalTo(-4)
make.height.equalTo(18)
make.bottom.equalTo(-8)
}
}
func updateUI() {
guard let dataModel = dataModel else { return }
iconV.image = UIImage(named: dataModel.iconName)
subtitleLable.text = dataModel.title
}
} }
...@@ -22,17 +22,28 @@ class YHHomeKingKongBlockView: UIView { ...@@ -22,17 +22,28 @@ class YHHomeKingKongBlockView: UIView {
} }
var arrData : [YHHomeKingKongBlockModel] = [ var arrData : [YHHomeKingKongBlockModel] = [
YHHomeKingKongBlockModel(type: "1", iconName: "", title: "身份福利"), YHHomeKingKongBlockModel(type: "1", iconName: "kingkong_sffl", title: "身份福利"),
YHHomeKingKongBlockModel(type: "2", iconName: "", title: "办理攻略"), YHHomeKingKongBlockModel(type: "2", iconName: "kingkong_blgl", title: "办理攻略"),
YHHomeKingKongBlockModel(type: "3", iconName: "", title: "客户心声"), YHHomeKingKongBlockModel(type: "3", iconName: "kingkong_khxs", title: "客户心声"),
YHHomeKingKongBlockModel(type: "4", iconName: "", title: "香港办事"), YHHomeKingKongBlockModel(type: "4", iconName: "kingkong_xgbs", title: "香港办事"),
] ]
} }
private extension YHHomeKingKongBlockView { private extension YHHomeKingKongBlockView {
func initView() { func initView() {
for (index,item) in arrData.enumerated() { let gap : CGFloat = 16.0
var offsetX : CGFloat = 0.0
for (_,item) in arrData.enumerated() {
let view = YHHomeKingKongBlockItem()
view.dataModel = item
addSubview(view)
view.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(offsetX)
make.width.height.equalTo(YHHomeKingKongBlockView.viewH)
}
offsetX = offsetX + YHHomeKingKongBlockView.viewH + gap
} }
} }
} }
...@@ -162,7 +162,7 @@ class YHDocListCell: UITableViewCell { ...@@ -162,7 +162,7 @@ class YHDocListCell: UITableViewCell {
if status == 2 { if status == 2 {
statusTxt = "待确认" statusTxt = "待确认"
color = UIColor.brandMainColor color = UIColor.brandMainColor
}else if status == 3 { } else if status == 3 {
statusTxt = "核对中" statusTxt = "核对中"
color = UIColor.warnColor color = UIColor.warnColor
} else if status == 4 { } else if status == 4 {
......
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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