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

处理 一处UI展示 不对的问题

parent 74c366be
......@@ -135,7 +135,7 @@
A5167B332B6A3A2D0084C08F /* YHPersonInfoBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5167B322B6A3A2D0084C08F /* YHPersonInfoBaseViewController.swift */; };
A5191F602B89E6FA001069F7 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5191F5F2B89E6FA001069F7 /* YHPreviewInfoQuestionAndAnswerItemView.swift */; };
A5191F622B89E748001069F7 /* YHPreviewQuestionAndAnswerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5191F612B89E748001069F7 /* YHPreviewQuestionAndAnswerModel.swift */; };
A5191F642B89E926001069F7 /* YHOtherInfoPreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5191F632B89E926001069F7 /* YHOtherInfoPreviewViewController.swift */; };
A5191F642B89E926001069F7 /* YHPreviewOtherInformationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5191F632B89E926001069F7 /* YHPreviewOtherInformationViewController.swift */; };
A5191F662B8AEFD2001069F7 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5191F652B8AEFD2001069F7 /* YHPreviewInfoQuestionAndAnswerItemsView.swift */; };
A5191F682B8B0F38001069F7 /* YHPreviewInfoNameAndSubNameItemsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5191F672B8B0F38001069F7 /* YHPreviewInfoNameAndSubNameItemsView.swift */; };
A5191F6A2B8B1888001069F7 /* YHPreviewInfoCertificateInformationItemsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5191F692B8B1888001069F7 /* YHPreviewInfoCertificateInformationItemsView.swift */; };
......@@ -237,6 +237,7 @@
A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */; };
A5D6AB1B2B46A1CC001C10A5 /* YHHomeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */; };
A5D6AB1D2B46AAFB001C10A5 /* YHHomePageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */; };
A5E116682B8B371F00FF0253 /* YHPreviewBasiceInformationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5E116672B8B371F00FF0253 /* YHPreviewBasiceInformationViewController.swift */; };
A5F685F22B86D2E3006F4BF9 /* YHOtherPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5F685F12B86D2E3006F4BF9 /* YHOtherPickerView.swift */; };
A5F78C822B68F39600EEA170 /* YHPreviewInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5F78C812B68F39600EEA170 /* YHPreviewInfoCell.swift */; };
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */; };
......@@ -429,7 +430,7 @@
A5167B322B6A3A2D0084C08F /* YHPersonInfoBaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPersonInfoBaseViewController.swift; sourceTree = "<group>"; };
A5191F5F2B89E6FA001069F7 /* YHPreviewInfoQuestionAndAnswerItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPreviewInfoQuestionAndAnswerItemView.swift; sourceTree = "<group>"; };
A5191F612B89E748001069F7 /* YHPreviewQuestionAndAnswerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPreviewQuestionAndAnswerModel.swift; sourceTree = "<group>"; };
A5191F632B89E926001069F7 /* YHOtherInfoPreviewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherInfoPreviewViewController.swift; sourceTree = "<group>"; };
A5191F632B89E926001069F7 /* YHPreviewOtherInformationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPreviewOtherInformationViewController.swift; sourceTree = "<group>"; };
A5191F652B8AEFD2001069F7 /* YHPreviewInfoQuestionAndAnswerItemsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPreviewInfoQuestionAndAnswerItemsView.swift; sourceTree = "<group>"; };
A5191F672B8B0F38001069F7 /* YHPreviewInfoNameAndSubNameItemsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPreviewInfoNameAndSubNameItemsView.swift; sourceTree = "<group>"; };
A5191F692B8B1888001069F7 /* YHPreviewInfoCertificateInformationItemsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPreviewInfoCertificateInformationItemsView.swift; sourceTree = "<group>"; };
......@@ -535,6 +536,7 @@
A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBbxCollectionViewCell.swift; sourceTree = "<group>"; };
A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeModel.swift; sourceTree = "<group>"; };
A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomePageViewModel.swift; sourceTree = "<group>"; };
A5E116672B8B371F00FF0253 /* YHPreviewBasiceInformationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPreviewBasiceInformationViewController.swift; sourceTree = "<group>"; };
A5F685F12B86D2E3006F4BF9 /* YHOtherPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherPickerView.swift; sourceTree = "<group>"; };
A5F78C812B68F39600EEA170 /* YHPreviewInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPreviewInfoCell.swift; sourceTree = "<group>"; };
A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectListVC.swift; sourceTree = "<group>"; };
......@@ -1055,7 +1057,8 @@
A5167B322B6A3A2D0084C08F /* YHPersonInfoBaseViewController.swift */,
A5FD63E72B67D8EA00D1D9DA /* YHMainApplicantInfoPreviewViewController.swift */,
A5FD63E92B67D95100D1D9DA /* YHFamilyMemberViewController.swift */,
A5191F632B89E926001069F7 /* YHOtherInfoPreviewViewController.swift */,
A5191F632B89E926001069F7 /* YHPreviewOtherInformationViewController.swift */,
A5E116672B8B371F00FF0253 /* YHPreviewBasiceInformationViewController.swift */,
);
path = C;
sourceTree = "<group>";
......@@ -1800,6 +1803,7 @@
0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */,
0468D4512B67721700CFB916 /* YHMainInformationCardTableViewCell.swift in Sources */,
0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */,
A5E116682B8B371F00FF0253 /* YHPreviewBasiceInformationViewController.swift in Sources */,
A5ACE9512B4564F7002C94D2 /* YhConstant.swift in Sources */,
A5FD63FC2B68DA6600D1D9DA /* YHPersonInfoCellModel2.swift in Sources */,
A5ACE94A2B4564F7002C94D2 /* YHHUDProgressView.swift in Sources */,
......@@ -1911,7 +1915,7 @@
0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */,
A5234E282B6E2EED00A33433 /* YHBasicInfoFillViewController.swift in Sources */,
04E86E312B81EA1000A35F4B /* YHWorkItemView.swift in Sources */,
A5191F642B89E926001069F7 /* YHOtherInfoPreviewViewController.swift in Sources */,
A5191F642B89E926001069F7 /* YHPreviewOtherInformationViewController.swift in Sources */,
A5191F6A2B8B1888001069F7 /* YHPreviewInfoCertificateInformationItemsView.swift in Sources */,
0468D4492B6258A900CFB916 /* YHItemView.swift in Sources */,
041B528F2B5E620E007EBCEB /* YHFormItemInputTextCell.swift in Sources */,
......
......@@ -49,15 +49,18 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
super.viewDidLoad()
do {
//主申请人
let vc = YHMainApplicantInfoPreviewViewController()
arrItemVCs.append(vc)
}
do {
let vc = YHFamilyMemberPreviewViewController()
arrItemVCs.append(vc)
}
do {
let vc = YHFamilyMemberPreviewViewController()
//基本资料
let vc = YHPreviewBasiceInformationViewController()
arrItemVCs.append(vc)
}
do {
......@@ -69,7 +72,8 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
arrItemVCs.append(vc)
}
do {
let vc = YHOtherInfoPreviewViewController()
//其他信息
let vc = YHPreviewOtherInformationViewController()
arrItemVCs.append(vc)
}
......
//
// YHPreviewBasiceInformationViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/2/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
/*
*基本资料信息 预览
*/
class YHPreviewBasiceInformationViewController: YHPersonInfoBaseViewController {
var arrData : [YHPreviewInfoSessionModel] = []
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
}
private extension YHPreviewBasiceInformationViewController {
func installData() {
do {
//主申请人
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "1、是否曾在香港或其他地方因任何罪行或违法行为被被定罪:", answer: "是",remark: "这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "2、是否曾在香港或其他地方被拒入境/递解/遣送或要求离境?", answer: "否")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "3、是否曾被拒绝签发香港或其他地方的签证/进入许可?", answer: "否")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "4、是否曾触犯香港或任何地方的入境法例?", answer: "是",remark: "我是测试数据哈我是测试数据哈我是测试数据哈我是测试数据哈我是测试数据哈我是测试数据哈我是测试数据哈我是测试数据哈")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "5、是否曾经使用另一个姓名或身份申请香港入境签证/进入许可或进入香港?", answer: "否")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4]
let model1 = YHPreviewInfoSessionModel(cellType: .questionAndAnswer, cellTitle: "主申请人", cellData0: arr)
arrData.append(model1)
}
do {
//配偶
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "1、是否曾被拒绝入境/递解/遣送或要求离开香港?", answer: "是",remark: "这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "2、是否曾被拒绝签发签证/进入许可以入境香港?", answer: "否")
let arr = [tmp0,tmp1]
let model1 = YHPreviewInfoSessionModel(cellType: .questionAndAnswer, cellTitle: "配偶", cellData0: arr)
arrData.append(model1)
}
do {
//子女-1
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "1、是否曾被拒绝入境/递解/遣送或要求离开香港?", answer: "是",remark: "这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "2、是否曾被拒绝签发签证/进入许可以入境香港?", answer: "否")
let arr = [tmp0,tmp1]
let model1 = YHPreviewInfoSessionModel(cellType: .questionAndAnswer, cellTitle: "子女-1", cellData0: arr)
arrData.append(model1)
}
do {
//子女-2
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "1、是否曾被拒绝入境/递解/遣送或要求离开香港?", answer: "是",remark: "这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。这里是详细的犯罪记录或违法行为说明,这里是详细的犯罪记录或违法行为说明。")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "2、是否曾被拒绝签发签证/进入许可以入境香港?", answer: "否")
let arr = [tmp0,tmp1]
let model1 = YHPreviewInfoSessionModel(cellType: .questionAndAnswer, cellTitle: "子女-2", cellData0: arr)
arrData.append(model1)
}
do {
//家庭背景
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "1、至少一名直系家庭成员(已婚配偶、父母、兄弟姐妹、子女)是现居于香港的香港永久性居民", answer: "不满足")
let arr = [tmp0]
let model1 = YHPreviewInfoSessionModel(cellType: .questionAndAnswer, cellTitle: "家庭背景", cellData0: arr)
arrData.append(model1)
}
do {
//家庭背景2
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "1、至少一名直系家庭成员(已婚配偶、父母、兄弟姐妹、子女)是现居于香港的香港永久性居民", answer: "满足",remark: "张三、李四、王五")
let arr = [tmp0]
let model1 = YHPreviewInfoSessionModel(cellType: .questionAndAnswer, cellTitle: "家庭背景2-测试满足的情况", cellData0: arr)
arrData.append(model1)
}
}
func setupUI() {
installData()
self.homeTableView.register(YHPreviewInfoCell.self,forCellReuseIdentifier: YHPreviewInfoCell.cellReuseIdentifier)
self.homeTableView.reloadData()
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHPreviewBasiceInformationViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return arrData.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHPreviewInfoCell.self)
cell.selectionStyle = .none
cell.model = arrData[indexPath.row]
return cell
}
}
......@@ -10,7 +10,7 @@ import UIKit
/*
*其他信息 预览
*/
class YHOtherInfoPreviewViewController: YHPersonInfoBaseViewController {
class YHPreviewOtherInformationViewController: YHPersonInfoBaseViewController {
var arrData : [YHPreviewInfoSessionModel] = []
override func viewDidLoad() {
super.viewDidLoad()
......@@ -20,7 +20,7 @@ class YHOtherInfoPreviewViewController: YHPersonInfoBaseViewController {
}
private extension YHOtherInfoPreviewViewController {
private extension YHPreviewOtherInformationViewController {
func installData() {
do {
//居住信息
......@@ -88,7 +88,7 @@ private extension YHOtherInfoPreviewViewController {
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHOtherInfoPreviewViewController {
extension YHPreviewOtherInformationViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return arrData.count
}
......
......@@ -43,6 +43,8 @@ extension YHPreviewInfoCell {
backgroundColor = .clear
contentView.backgroundColor = .clear
contentView.addSubview(holdView)
holdView.removeSubviews()
holdView.snp.makeConstraints { make in
make.top.equalTo(14)
make.left.bottom.equalToSuperview()
......@@ -89,7 +91,6 @@ extension YHPreviewInfoCell {
view.snp.makeConstraints { make in
make.edges.equalTo(0)
}
}
else {
......
......@@ -88,26 +88,14 @@ class YHPreviewInfoQuestionAndAnswerItemView: UIView {
}
addSubview(subtitleLable)
subtitleLable.snp.makeConstraints { make in
make.top.equalTo(nameLable.snp.bottom).offset(8)
make.right.equalToSuperview()
make.left.equalToSuperview()
// subtitleLable.snp.makeConstraints { make in
// make.top.equalTo(nameLable.snp.bottom).offset(8)
// make.right.equalToSuperview()
// make.left.equalToSuperview()
//
// make.bottom.equalToSuperview()
// }
make.bottom.equalToSuperview()
}
addSubview(remarkHoldView)
remarkHoldView.snp.makeConstraints { make in
make.top.equalTo(subtitleLable.snp.bottom).offset(8)
make.right.equalToSuperview()
make.left.equalToSuperview()
}
remarkHoldView.addSubview(remarkLable)
remarkLable.snp.makeConstraints { make in
make.top.left.equalTo(12)
make.bottom.right.equalTo(-12)
}
}
var dataModel : YHPreviewQuestionAndAnswerModel? {
......@@ -121,31 +109,50 @@ extension YHPreviewInfoQuestionAndAnswerItemView {
func updateUI() {
guard let model = dataModel else { return }
removeSubviews()
setupUI()
nameLable.text = model.question
subtitleLable.text = model.answer
if let remark = model.remark {
remarkLable.text = remark
subtitleLable.snp.removeConstraints()
subtitleLable.snp.makeConstraints { make in
make.top.equalTo(nameLable.snp.bottom).offset(8)
make.right.equalToSuperview()
make.left.equalToSuperview()
}
remarkHoldView.isHidden = false
remarkHoldView.snp.removeConstraints()
addSubview(remarkHoldView)
remarkHoldView.snp.makeConstraints { make in
make.top.equalTo(subtitleLable.snp.bottom).offset(8)
make.right.equalToSuperview()
make.left.equalToSuperview()
}
remarkHoldView.addSubview(remarkLable)
remarkLable.snp.makeConstraints { make in
make.top.left.equalTo(12)
make.bottom.right.equalTo(-12)
}
remarkLable.text = remark
remarkHoldView.isHidden = false
remarkHoldView.snp.makeConstraints { make in
make.top.equalTo(subtitleLable.snp.bottom).offset(8)
make.right.equalToSuperview()
make.left.equalToSuperview()
make.bottom.equalToSuperview()
}
} else {
subtitleLable.snp.makeConstraints { make in
make.top.equalTo(nameLable.snp.bottom).offset(8)
make.right.equalToSuperview()
make.left.equalToSuperview()
make.bottom.equalToSuperview()
}
}
}
}
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