Commit 207fe7b1 authored by yqz's avatar yqz

首页 按钮换位置

parent 15dc6d7a
...@@ -9,7 +9,7 @@ import UIKit ...@@ -9,7 +9,7 @@ import UIKit
class HomeNavView:UIView { class HomeNavView:UIView {
private var titleLabel:UILabel! // private var titleLabel:UILabel!
private var settingBtn:UIButton! private var settingBtn:UIButton!
private var proBtn:UIButton! private var proBtn:UIButton!
private var tipLabel:UILabel! private var tipLabel:UILabel!
...@@ -29,19 +29,19 @@ class HomeNavView:UIView { ...@@ -29,19 +29,19 @@ class HomeNavView:UIView {
backgroundColor = .white backgroundColor = .white
titleLabel = UILabel() // titleLabel = UILabel()
titleLabel.text = "Cleanup" // titleLabel.text = "Cleanup"
titleLabel.font = UIFont.systemFont(ofSize: 20, weight: .bold) // titleLabel.font = UIFont.systemFont(ofSize: 20, weight: .bold)
titleLabel.textColor = UIColor.colorWithHex(hexStr: black3Color) // titleLabel.textColor = UIColor.colorWithHex(hexStr: black3Color)
titleLabel.sizeToFit() // titleLabel.sizeToFit()
//
self.addSubview(titleLabel) // self.addSubview(titleLabel)
//
titleLabel.snp.makeConstraints { make in // titleLabel.snp.makeConstraints { make in
//
make.centerY.equalTo(navCenterY) // make.centerY.equalTo(navCenterY)
make.left.equalTo(marginLR) // make.left.equalTo(marginLR)
} // }
settingBtn = UIButton() settingBtn = UIButton()
settingBtn.setImage(UIImage(named: "home_setting_icon"), for: .normal) settingBtn.setImage(UIImage(named: "home_setting_icon"), for: .normal)
...@@ -49,9 +49,10 @@ class HomeNavView:UIView { ...@@ -49,9 +49,10 @@ class HomeNavView:UIView {
self.addSubview(settingBtn) self.addSubview(settingBtn)
settingBtn.snp.makeConstraints { make in settingBtn.snp.makeConstraints { make in
// make.centerY.equalTo(navCenterY)
// make.right.equalToSuperview().offset(-marginLR)
make.centerY.equalTo(navCenterY) make.centerY.equalTo(navCenterY)
make.right.equalToSuperview().offset(-marginLR) make.left.equalTo(marginLR)
make.width.height.equalTo(iconWH) make.width.height.equalTo(iconWH)
} }
...@@ -62,8 +63,10 @@ class HomeNavView:UIView { ...@@ -62,8 +63,10 @@ class HomeNavView:UIView {
proBtn.snp.makeConstraints { make in proBtn.snp.makeConstraints { make in
// make.centerY.equalTo(navCenterY)
// make.right.equalTo(settingBtn.snp.left).offset(-8)
make.centerY.equalTo(navCenterY) make.centerY.equalTo(navCenterY)
make.right.equalTo(settingBtn.snp.left).offset(-8) make.right.equalToSuperview().offset(-marginLR)
make.width.equalTo(70) make.width.equalTo(70)
make.height.equalTo(iconWH) make.height.equalTo(iconWH)
} }
......
...@@ -403,11 +403,11 @@ extension HomeNoAdsViewController : UIScrollViewDelegate { ...@@ -403,11 +403,11 @@ extension HomeNoAdsViewController : UIScrollViewDelegate {
} }
ppBtn.snp.makeConstraints { make in ppBtn.snp.makeConstraints { make in
make.top.equalTo(buybut.snp.bottom).offset(10) make.top.equalTo(buybut.snp.bottom).offset(10)
make.left.equalToSuperview().offset(15) make.left.equalTo(buybut)
} }
restoreBtn.snp.makeConstraints { make in restoreBtn.snp.makeConstraints { make in
make.centerY.equalTo(ppBtn) make.centerY.equalTo(ppBtn)
make.right.equalTo(stack.snp.right).offset(-10) make.right.equalTo(buybut.snp.right)
} }
self.type = 0 self.type = 0
self.view.layoutIfNeeded() self.view.layoutIfNeeded()
......
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