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

一处 UI 调整

parent f72045e2
...@@ -97,17 +97,18 @@ extension YHServiceCenterMainViewController { ...@@ -97,17 +97,18 @@ extension YHServiceCenterMainViewController {
make.height.equalTo(216) make.height.equalTo(216)
} }
view.addSubview(loginTipsView) view.addSubview(loginTipsView)
loginTipsView.snp.makeConstraints { make in loginTipsView.snp.makeConstraints { make in
make.centerX.equalToSuperview() make.centerX.equalToSuperview()
make.centerY.equalToSuperview().offset(-64) make.centerY.equalToSuperview()
make.width.equalTo(KScreenWidth) make.width.equalTo(KScreenWidth)
} }
view.addSubview(noDataView) view.addSubview(noDataView)
noDataView.snp.makeConstraints { make in noDataView.snp.makeConstraints { make in
make.centerX.equalToSuperview() make.centerX.equalToSuperview()
make.centerY.equalToSuperview().offset(-64) make.centerY.equalToSuperview()
make.width.equalTo(KScreenWidth) make.width.equalTo(KScreenWidth)
} }
...@@ -124,12 +125,9 @@ extension YHServiceCenterMainViewController { ...@@ -124,12 +125,9 @@ extension YHServiceCenterMainViewController {
self.homeTableView.isHidden = true self.homeTableView.isHidden = true
self.noDataView.isHidden = false self.noDataView.isHidden = false
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
} }
} }
......
...@@ -61,6 +61,38 @@ class YHLoginTipsView: UIView { ...@@ -61,6 +61,38 @@ class YHLoginTipsView: UIView {
initView() initView()
} }
override func layoutSubviews() {
super.layoutSubviews()
tipsLab.snp.removeConstraints()
loginBtn.snp.removeConstraints()
loginBtn.isHidden = true
if viewType == 0 {
loginBtn.isHidden = false
tipsLab.snp.remakeConstraints { make in
make.top.equalTo(iconImgV.snp.bottom).offset(12)
make.centerX.equalToSuperview()
make.left.right.equalToSuperview()
}
loginBtn.snp.remakeConstraints { make in
make.top.equalTo(tipsLab.snp.bottom).offset(21)
make.centerX.equalToSuperview()
make.height.equalTo(36)
make.width.equalTo(86)
make.bottom.equalToSuperview()
}
} else {
tipsLab.snp.remakeConstraints { make in
make.top.equalTo(iconImgV.snp.bottom).offset(12)
make.centerX.equalToSuperview()
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
}
}
private func initView() { private func initView() {
addSubview(iconImgV) addSubview(iconImgV)
iconImgV.snp.makeConstraints { make in iconImgV.snp.makeConstraints { make in
...@@ -88,7 +120,7 @@ class YHLoginTipsView: UIView { ...@@ -88,7 +120,7 @@ class YHLoginTipsView: UIView {
loginBtn.addTarget(self, action: #selector(clickLoginBtn), for: .touchUpInside) loginBtn.addTarget(self, action: #selector(clickLoginBtn), for: .touchUpInside)
layoutIfNeeded() layoutIfNeeded()
loginBtn.backgroundColor = .brandMainColor//for test hjl loginBtn.backgroundColor = .brandMainColor
loginBtn.addYinHeGradualLayer() loginBtn.addYinHeGradualLayer()
} }
......
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