Commit 11f1d942 authored by David黄金龙's avatar David黄金龙

提示 框体

parent 6d06d24e
...@@ -130,6 +130,8 @@ ...@@ -130,6 +130,8 @@
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 */; }; A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */; };
A5FD63C72B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */; }; A5FD63C72B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */; };
A5FD63C92B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C82B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift */; };
A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63CA2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
...@@ -292,6 +294,8 @@ ...@@ -292,6 +294,8 @@
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>"; }; A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSubmitAllInfoCheckView.swift; sourceTree = "<group>"; };
A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSubmintAllInfoSuccessTipView.swift; sourceTree = "<group>"; }; A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSubmintAllInfoSuccessTipView.swift; sourceTree = "<group>"; };
A5FD63C82B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationFillTipsAlertView.swift; sourceTree = "<group>"; };
A5FD63CA2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationFillTipsCell.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 */
...@@ -755,6 +759,8 @@ ...@@ -755,6 +759,8 @@
A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */, A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */,
A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */, A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */,
A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */, A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */,
A5FD63C82B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift */,
A5FD63CA2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1107,6 +1113,7 @@ ...@@ -1107,6 +1113,7 @@
A5ACE92E2B4564F7002C94D2 /* YHValidateCodeInputView.swift in Sources */, A5ACE92E2B4564F7002C94D2 /* YHValidateCodeInputView.swift in Sources */,
A5ACE94E2B4564F7002C94D2 /* AlignedCollectionViewFlowLayout.swift in Sources */, A5ACE94E2B4564F7002C94D2 /* AlignedCollectionViewFlowLayout.swift in Sources */,
A5ACE93B2B4564F7002C94D2 /* UIFont+Extension.swift in Sources */, A5ACE93B2B4564F7002C94D2 /* UIFont+Extension.swift in Sources */,
A5FD63C92B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift in Sources */,
A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */, A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */,
0468D4432B61F76800CFB916 /* YHMainApplicantInformationViewController.swift in Sources */, 0468D4432B61F76800CFB916 /* YHMainApplicantInformationViewController.swift in Sources */,
0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */, 0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */,
...@@ -1165,6 +1172,7 @@ ...@@ -1165,6 +1172,7 @@
A5C5B3272B57C8D500A7C5D1 /* YHDavidCell2.swift in Sources */, A5C5B3272B57C8D500A7C5D1 /* YHDavidCell2.swift in Sources */,
A5ACE9372B4564F7002C94D2 /* YHBaseUrlManager.swift in Sources */, A5ACE9372B4564F7002C94D2 /* YHBaseUrlManager.swift in Sources */,
A5ACE9352B4564F7002C94D2 /* YHNetRequest.swift in Sources */, A5ACE9352B4564F7002C94D2 /* YHNetRequest.swift in Sources */,
A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */,
A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */, A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
......
...@@ -74,8 +74,17 @@ class YHInformationPerfectListVC: YHBaseViewController { ...@@ -74,8 +74,17 @@ class YHInformationPerfectListVC: YHBaseViewController {
super.viewDidLoad() super.viewDidLoad()
setupUI() setupUI()
loadData() loadData()
YHInformationFillTipsAlertView.showCheckView { agree in
if agree == true {
printLog("点击了 确认 按钮")
} else {
printLog("点击了 取消 按钮")
}
}
} }
} }
extension YHInformationPerfectListVC { extension YHInformationPerfectListVC {
......
//
// YHInformationFillTipsAlertView.swift
// galaxy
//
// Created by davidhuangA on 2024/1/26.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHInformationFillTipsAlertView: UIView {
typealias Block = (Bool) -> ()
var block: Block?
var centerView: UIView!
var titleLabel: UILabel!
var messageLabel: UILabel!
var agreeButton: UIButton!
var disAgressButton: UIButton!
//头部背景图片
lazy var headBkgImagV: UIImageView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "submit_success_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
//头部背景图片
lazy var successIcon: UIImageView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "submit_success_icon")
imagV.contentMode = .scaleAspectFill
return imagV
}()
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = true
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
// tableView.estimatedRowHeight = 100
tableView.register(YHInformationFillTipsCell.self,forCellReuseIdentifier: YHInformationFillTipsCell.cellReuseIdentifier)
return tableView
}()
//类方法
static func showCheckView(callBack: @escaping Block) {
let view = YHInformationFillTipsAlertView(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.bottom.equalToSuperview()
make.width.equalTo(KScreenWidth)
make.height.equalTo(680)
}
let bottomView = UIView()
centerView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
}
let checkBtn = UIButton(type: .custom)
checkBtn.setBackgroundImage(UIImage.from(color: UIColor(hex:0x4D9FF8)), for: .normal)
checkBtn.setTitle("准备完毕", for: .normal)
checkBtn.setTitleColor(.white, for: .normal)
checkBtn.addTarget(self, action: #selector(onClickReadyBtn), for: .touchUpInside)
checkBtn.layer.cornerRadius = 8
checkBtn.clipsToBounds = true
bottomView.addSubview(checkBtn)
checkBtn.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(-40)
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(48)
}
let lable00 = UILabel(text: "我确认我所提供的材料真实有效,并知悉其中内容。")
lable00.font = kFont(size: 12)
lable00.textColor = UIColor(red: 0.533, green: 0.561, blue: 0.596, alpha: 1)
bottomView.addSubview(lable00)
lable00.snp.makeConstraints { make in
make.bottom.equalTo(checkBtn.snp.top).offset(-14)
make.left.equalTo(41)
make.right.equalTo(-16)
make.height.equalTo(20)
make.top.equalTo(16)
}
let selectedBtn = UIButton(type: .custom)
selectedBtn.setImage(UIImage(named: "selected_icon_0"), for: .normal)
selectedBtn.setImage(UIImage(named: "selected_icon_1"), for: .selected)
selectedBtn.addTarget(self, action: #selector(onClickAgree), for: .touchUpInside)
bottomView.addSubview(selectedBtn)
selectedBtn.snp.makeConstraints { make in
make.centerY.equalTo(lable00)
make.left.equalTo(21)
make.height.width.equalTo(12)
}
agreeButton = selectedBtn
let topView = UIView()
// topView.backgroundColor = .red
centerView.addSubview(topView)
topView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
}
let lable01 = UILabel(text: "信息填写提示")
lable01.font = kFont(size: 17)
lable01.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
topView.addSubview(lable01)
lable01.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.top.equalTo(16)
make.height.equalTo(24)
}
let line = UIView()
line.backgroundColor = UIColor(red: 0.941, green: 0.941, blue: 0.941, alpha: 1)
topView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.top.equalTo(lable01.snp.bottom).offset(12)
make.height.equalTo(0.5)
make.bottom.equalToSuperview()
}
//middle view
let middleView = UIView()
centerView.addSubview(middleView)
middleView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(topView.snp.bottom)
make.bottom.equalTo(bottomView.snp.top)
}
// middleView.backgroundColor = .purplefor test hjl
middleView.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.edges.equalTo(0)
}
homeTableView.delegate = self
homeTableView.dataSource = self
// homeTableView.backgroundColor = .red //for test hjl
}
@objc func onClickReadyBtn() {
if agreeButton.isSelected == true {
block?(true)
dismiss()
} else {
YHHUD.flash(message: "请先勾选确认知悉内容")
}
}
@objc func onClickAgree() {
agreeButton.isSelected = !agreeButton.isSelected
}
@objc func agree() {
block?(true)
dismiss()
}
@objc private func handleTap(_ sender: AnyObject?) {
print("处理点击手势")
dismiss()
}
@objc func disagree() {
block?(false)
dismiss()
}
func dismiss() {
removeFromSuperview()
}
}
extension YHInformationFillTipsAlertView: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHInformationFillTipsAlertView : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHInformationFillTipsCell.self)
cell.selectionStyle = .none
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 tableView Cell \(indexPath.row)")
}
}
...@@ -129,7 +129,7 @@ class YHSubmintAllInfoSuccessTipView: UIView { ...@@ -129,7 +129,7 @@ class YHSubmintAllInfoSuccessTipView: UIView {
make.height.equalTo(50) make.height.equalTo(50)
} }
let a: ASAttributedString = .init("90", .font(kFont(name: "DINAlternate-Bold", size: 32)),.foreground(UIColor(hex:0xFF9900))) let a: ASAttributedString = .init("90", .font(kFont(name: "PingFang SC", size: 32)),.foreground(UIColor(hex:0xFF9900)))
let b: ASAttributedString = .init("分", .font(kFont(name: "PingFang SC", size: 12)),.foreground(UIColor(hex:0x888F98))) let b: ASAttributedString = .init("分", .font(kFont(name: "PingFang SC", size: 12)),.foreground(UIColor(hex:0x888F98)))
messageLabel.attributed.text = a + b messageLabel.attributed.text = a + b
......
{
"images" : [
{
"filename" : "Group 2849.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2849@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2849@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "Rectangle 2490.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2490@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2490@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "Group 33334300.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 33334300@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 33334300@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "温馨提示.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "温馨提示@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "温馨提示@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