Commit 5a28bab0 authored by David黄金龙's avatar David黄金龙

添加 信息提交 二次提醒按钮

parent 44920535
...@@ -128,6 +128,7 @@ ...@@ -128,6 +128,7 @@
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */; }; A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */; };
A5FD63C12B62616D00D1D9DA /* YHInformationPerfectModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */; }; A5FD63C12B62616D00D1D9DA /* YHInformationPerfectModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */; };
A5FD63C32B63438A00D1D9DA /* YHContactMainItemStatusModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C22B63438A00D1D9DA /* YHContactMainItemStatusModel.swift */; }; A5FD63C32B63438A00D1D9DA /* YHContactMainItemStatusModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C22B63438A00D1D9DA /* YHContactMainItemStatusModel.swift */; };
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
...@@ -288,6 +289,7 @@ ...@@ -288,6 +289,7 @@
A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectCell.swift; sourceTree = "<group>"; }; A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectCell.swift; sourceTree = "<group>"; };
A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectModel.swift; sourceTree = "<group>"; }; A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectModel.swift; sourceTree = "<group>"; };
A5FD63C22B63438A00D1D9DA /* YHContactMainItemStatusModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContactMainItemStatusModel.swift; sourceTree = "<group>"; }; A5FD63C22B63438A00D1D9DA /* YHContactMainItemStatusModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContactMainItemStatusModel.swift; sourceTree = "<group>"; };
A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSubmitAllInfoCheckView.swift; sourceTree = "<group>"; };
B6BB01E4C5DB87B66F0ECE84 /* Pods-galaxy.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.release.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.release.xcconfig"; sourceTree = "<group>"; }; B6BB01E4C5DB87B66F0ECE84 /* Pods-galaxy.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.release.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -749,6 +751,7 @@ ...@@ -749,6 +751,7 @@
A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */, A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */,
A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */, A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */,
A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */, A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */,
A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1079,6 +1082,7 @@ ...@@ -1079,6 +1082,7 @@
0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */, 0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */,
A5ACE9512B4564F7002C94D2 /* YhConstant.swift in Sources */, A5ACE9512B4564F7002C94D2 /* YhConstant.swift in Sources */,
A5ACE94A2B4564F7002C94D2 /* BsHUDProgressView.swift in Sources */, A5ACE94A2B4564F7002C94D2 /* BsHUDProgressView.swift in Sources */,
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */,
A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */, A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */,
0468D4282B50D4AF00CFB916 /* YHPrivacyAlertView.swift in Sources */, 0468D4282B50D4AF00CFB916 /* YHPrivacyAlertView.swift in Sources */,
0468D4342B56587B00CFB916 /* YHOSSManager.swift in Sources */, 0468D4342B56587B00CFB916 /* YHOSSManager.swift in Sources */,
......
...@@ -38,8 +38,6 @@ class YHInformationPerfectListVC: YHBaseViewController { ...@@ -38,8 +38,6 @@ class YHInformationPerfectListVC: YHBaseViewController {
var myHeadView : UIView = { var myHeadView : UIView = {
let view = UIView() let view = UIView()
// view.backgroundColor = .purple//for test hjl
let titleLable = UILabel(text: "您好,黄先生") let titleLable = UILabel(text: "您好,黄先生")
titleLable.font = kFont(size: 21) titleLable.font = kFont(size: 21)
...@@ -90,6 +88,16 @@ extension YHInformationPerfectListVC { ...@@ -90,6 +88,16 @@ extension YHInformationPerfectListVC {
// } // }
} }
@objc func clickSubmitBtn() {
YHSubmitAllInfoCheckView.showCheckView { agree in
if agree == true {
printLog("点击了 确认 按钮")
} else {
printLog("点击了 取消 按钮")
}
}
}
func setupUI() { func setupUI() {
gk_navTitle = "信息完善" gk_navTitle = "信息完善"
gk_navBarAlpha = 1.0 gk_navBarAlpha = 1.0
...@@ -147,6 +155,8 @@ extension YHInformationPerfectListVC { ...@@ -147,6 +155,8 @@ extension YHInformationPerfectListVC {
submitBtn.layer.cornerRadius = 8 submitBtn.layer.cornerRadius = 8
submitBtn.clipsToBounds = true submitBtn.clipsToBounds = true
myBottomView.addSubview(submitBtn) myBottomView.addSubview(submitBtn)
submitBtn.addTarget(self, action: #selector(clickSubmitBtn), for: .touchUpInside)
submitBtn.snp.makeConstraints { make in submitBtn.snp.makeConstraints { make in
make.top.equalTo(8) make.top.equalTo(8)
make.left.equalTo(16) make.left.equalTo(16)
...@@ -194,7 +204,6 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource ...@@ -194,7 +204,6 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true) tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 \(indexPath.section)section --- \(indexPath.row)row") printLog("点击了 \(indexPath.section)section --- \(indexPath.row)row")
let model = arrData[indexPath.row] let model = arrData[indexPath.row]
if (indexPath.row + 1 > myTargetIndex) { if (indexPath.row + 1 > myTargetIndex) {
let message = "请先完成" + model.name + "填写" let message = "请先完成" + model.name + "填写"
......
//
// YHSubmitAllInfoCheckView.swift
// galaxy
//
// Created by davidhuangA on 2024/1/26.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSubmitAllInfoCheckView: UIView {
typealias Block = (Bool) -> ()
var block: Block?
var centerView: UIView!
var titleLabel: UILabel!
var messageLabel: UILabel!
var agreeButton: UIButton!
var disAgressButton: UIButton!
static func showCheckView(callBack: @escaping Block) {
let view = YHSubmitAllInfoCheckView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = callBack
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor(white: 0.5, alpha: 0.1)
let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap))
tap.delegate = self
addGestureRecognizer(tap)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 12
return view
}()
addSubview(centerView)
centerView.snp.makeConstraints { make in
make.center.equalToSuperview()
make.width.equalTo(299)
make.height.equalTo(165)
}
// titleLabel = {
// let label = UILabel()
// label.text = "同意隐私协议"
// label.font = kFont(size: 16)
// label.textColor = UIColor(hex:0x222222)
// label.textAlignment = .center
// return label
// }()
// centerView.addSubview(titleLabel)
// titleLabel.snp.makeConstraints { make in
// make.left.right.equalToSuperview()
// make.height.equalTo(19)
// make.top.equalTo(27)
// }
messageLabel = {
let label = UILabel()
label.text = "确定是否提交信息?提交后将不能修改"
label.font = kFont(size: 16)
label.textColor = UIColor(hex:0x222222)
label.textAlignment = .left
label.numberOfLines = 0
return label
}()
centerView.addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(22)
make.right.equalTo(-22)
make.height.equalTo(42)
make.top.equalTo(40)
}
disAgressButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0xffffff)
button.titleLabel?.font = kBoldFont(size: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消", for: .normal)
button.setTitleColor( UIColor(hex:0x3c86f8), for: .normal)
button.layer.cornerRadius = 8
button.layer.borderWidth = 1
button.layer.borderColor = UIColor(hex: 0x3c86f8).cgColor
button.addTarget(self, action: #selector(disagree), for: .touchUpInside)
return button
}()
centerView.addSubview(disAgressButton)
disAgressButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.bottom.equalTo(-21)
make.width.equalTo(128)
make.height.equalTo(45)
}
agreeButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x3c86f8)
button.titleLabel?.font = kBoldFont(size: 14)
button.contentHorizontalAlignment = .center
button.setTitle("确认", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = 8
button.addTarget(self, action: #selector(agree), for: .touchUpInside)
return button
}()
centerView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
make.right.equalTo(-16)
make.bottom.equalTo(-21)
make.width.equalTo(128)
make.height.equalTo(45)
}
}
@objc func agree() {
block?(true)
dismiss()
}
@objc private func handleTap(_ sender: AnyObject?) {
print("处理点击手势")
dismiss()
}
@objc func disagree() {
block?(false)
dismiss()
}
func dismiss() {
removeFromSuperview()
}
}
extension YHSubmitAllInfoCheckView: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
}
...@@ -31,6 +31,7 @@ class YHPrivacyAlertView: UIView { ...@@ -31,6 +31,7 @@ class YHPrivacyAlertView: UIView {
} }
func setView() { func setView() {
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
centerView = { centerView = {
let view = UIView() let view = UIView()
view.backgroundColor = .white view.backgroundColor = .white
......
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