Commit 19acaa2c authored by David黄金龙's avatar David黄金龙

添加底部的button 按钮提交

parent d2150ba5
...@@ -65,6 +65,13 @@ class YHInformationPerfectListVC: YHBaseViewController { ...@@ -65,6 +65,13 @@ class YHInformationPerfectListVC: YHBaseViewController {
return view return view
}() }()
var myBottomView : UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
setupUI() setupUI()
...@@ -123,23 +130,42 @@ extension YHInformationPerfectListVC { ...@@ -123,23 +130,42 @@ extension YHInformationPerfectListVC {
} }
view.addSubview(myBottomView)
myBottomView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.right.equalToSuperview()
make.height.equalTo(84)
}
let submitBtn = UIButton(type: .custom)
submitBtn.layer.opacity = 0.4
submitBtn.setTitle("提交信息", for: .normal)
submitBtn.setTitleColor(UIColor.white, for: .normal)
// submitBtn.addGradualLayer([UIColor(hex: 0x2274EE, alpha: 1.0),UIColor(hex: 0x3A85FC, alpha: 1.0)])
submitBtn.setBackgroundImage(UIImage.from(color: UIColor(hex: 0x4D9FF8, alpha: 1.0)), for: .normal)
submitBtn.layer.cornerRadius = 8
submitBtn.clipsToBounds = true
myBottomView.addSubview(submitBtn)
submitBtn.snp.makeConstraints { make in
make.top.equalTo(8)
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(48)
}
homeTableView.delegate = self homeTableView.delegate = self
homeTableView.dataSource = self homeTableView.dataSource = self
view.addSubview(homeTableView) view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in homeTableView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar) make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview() make.bottom.equalTo(myBottomView.snp.top)
} }
// view.layoutIfNeeded()
myHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 96) myHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 96)
homeTableView.tableHeaderView = myHeadView homeTableView.tableHeaderView = myHeadView
homeTableView.reloadData() homeTableView.reloadData()
} }
} }
......
...@@ -132,11 +132,14 @@ extension YHInformationPerfectCell { ...@@ -132,11 +132,14 @@ extension YHInformationPerfectCell {
//middle //middle
if dataModel?.isFinished == true { if dataModel?.isFinished == true {
midImagV.image = UIImage(named: "mid_image") midImagV.image = UIImage(named: "mid_image")
contentView.layer.opacity = 1.0
} else { } else {
if dataModel?.isDoing == true { if dataModel?.isDoing == true {
midImagV.image = UIImage(named: "mid_image1") midImagV.image = UIImage(named: "mid_image1")
contentView.layer.opacity = 1.0
} else { } else {
midImagV.image = UIImage(named: "mid_image2") midImagV.image = UIImage(named: "mid_image2")
contentView.layer.opacity = 0.4
} }
} }
...@@ -153,6 +156,9 @@ extension YHInformationPerfectCell { ...@@ -153,6 +156,9 @@ extension YHInformationPerfectCell {
} }
} }
} }
func setupUI() { func setupUI() {
......
...@@ -21,8 +21,8 @@ extension UIView { ...@@ -21,8 +21,8 @@ extension UIView {
let gradientLayer = CAGradientLayer() let gradientLayer = CAGradientLayer()
gradientLayer.colors = colors gradientLayer.colors = colors
gradientLayer.locations = [0, 1.0] gradientLayer.locations = [0, 1.0]
gradientLayer.startPoint = CGPoint(x: 0.02, y: 0.5) gradientLayer.startPoint = CGPoint(x: 0.12, y: 0.25)
gradientLayer.endPoint = CGPoint(x: 1.0, y: 0.5) gradientLayer.endPoint = CGPoint(x: 0.38, y: 0.25)
gradientLayer.frame = self.bounds gradientLayer.frame = self.bounds
self.layer.addSublayer(gradientLayer) self.layer.addSublayer(gradientLayer)
} }
......
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