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

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  //  在港递交预约
  // 递交提示
  //  续签信息确认
  续签在港缴费
parents 24a2e4e1 defa74cc
This diff is collapsed.
......@@ -23,8 +23,8 @@ class YHHKRecordsSummaryVC: YHBaseViewController {
private lazy var datas: [YHHKRecordSectionType] = []
private lazy var tableView: YHGestureTableView = {
let view = YHGestureTableView(frame: .zero, style: .plain)
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .plain)
view.backgroundColor = .clear
view.separatorStyle = .none
view.rowHeight = UITableView.automaticDimension
......
//
// YHHKVisaRenewalPaymentVC.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKVisaRenewalPaymentVC: YHBaseViewController {
private lazy var stepView: YHHKVisaRenewalPaymentStepView = {
let view = YHHKVisaRenewalPaymentStepView.init(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 74))
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .plain)
view.backgroundColor = .clear
view.separatorStyle = .none
view.rowHeight = UITableView.automaticDimension
view.estimatedRowHeight = 52.0
view.dataSource = self
view.delegate = self
view.showsVerticalScrollIndicator = false
//view.register(YHHKRecordsHeaderCell.self, forCellReuseIdentifier: YHHKRecordsHeaderCell.cellReuseIdentifier)
return view
}()
private let orderId: Int
init(orderId: Int) {
self.orderId = orderId
super.init(nibName: nil, bundle: nil)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
}
extension YHHKVisaRenewalPaymentVC {
private func setupUI() {
gk_navTitle = "签证缴费"
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(stepView)
view.addSubview(tableView)
stepView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(74)
}
tableView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(kMargin).priority(.high)
make.right.equalToSuperview().offset(-kMargin).priority(.high)
make.top.equalTo(stepView.snp.bottom)
make.bottom.equalToSuperview()
}
tableView.tableHeaderView = UIView(frame: CGRect.init(x: 0, y: 0, width: KScreenWidth, height: kMargin))
tableView.tableFooterView = UIView(frame: CGRect.init(x: 0, y: 0, width: KScreenWidth, height: kMargin))
}
}
extension YHHKVisaRenewalPaymentVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 0
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 16.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
}
//
// YHVisaRenewalGuideVC.swift
// galaxy
//
// Created by alexzzw on 2024/10/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalGuideVC: YHBaseViewController {
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .plain)
view.backgroundColor = .clear
view.separatorStyle = .none
view.rowHeight = UITableView.automaticDimension
view.estimatedRowHeight = 52.0
view.dataSource = self
view.delegate = self
view.showsVerticalScrollIndicator = false
view.register(YHHKRecordsHeaderCell.self, forCellReuseIdentifier: YHHKRecordsHeaderCell.cellReuseIdentifier)
return view
}()
private lazy var sureButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.setTitle("请上滑看完指引后操作(5s)", for: .disabled)
button.setTitle("我已知悉,确认", for: .normal)
button.setTitle("我已知悉,确认", for: .highlighted)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .highlighted)
button.addTarget(self, action: #selector(clickSureButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
}
extension YHVisaRenewalGuideVC {
@objc private func clickSureButton() {
//
}
private func setupUI() {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = UIColor.white
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(sureButton)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.right.equalToSuperview()
make.bottom.equalTo(view.safeAreaLayoutGuide.snp.bottom)
make.height.equalTo(64)
}
sureButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.centerY.equalToSuperview()
make.height.equalTo(48)
}
tableView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.equalToSuperview()
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect.init(x: 0, y: 0, width: KScreenWidth, height: kMargin))
preferredContentSize = CGSize(width: KScreenWidth, height: KScreenHeight - k_Height_NavigationtBarAndStatuBar)
}
}
extension YHVisaRenewalGuideVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 0
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
}
//
// YHBottomPresentationController.swift
// galaxy
//
// Created by alexzzw on 2024/10/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHBottomPresentationController: UIPresentationController {
/*
let vc = UIViewController()
let pc = YHBottomPresentationController(presentedViewController: vc, presenting: self)
pc.customRadius = 12.0
vc.transitioningDelegate = pc
vc.closeButtonClickClosure = { [weak vc] in
vc?.dismiss(animated: true)
}
pc.dimmingViewTapAction = {
vc.dismiss(animated: true, completion: nil)
}
present(vc, animated: true, completion: nil)
*/
// MARK: - Properties
@IBInspectable public var customRadius: CGFloat = 8.0
@IBInspectable public var blurEffectAlpha: CGFloat = 0.5
public var dimmingViewTapAction: (() -> Void)?
private var presentationWrappingView: UIView?
private enum TransitionState {
case presenting
case dismissing
}
private struct Constants {
static let animationDuration: TimeInterval = 0.35
static let shadowOpacity: Float = 0.44
static let shadowRadius: CGFloat = 13.0
static let shadowOffset: CGSize = CGSize(width: 0, height: -6)
}
// MARK: - Lazy Properties
private lazy var dimmingView: UIView = {
let view = UIView()
view.backgroundColor = UIColor.black.withAlphaComponent(blurEffectAlpha)
view.isOpaque = false
view.autoresizingMask = [.flexibleHeight, .flexibleWidth]
view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(dimmingViewTapped(_:))))
return view
}()
private lazy var visualEffectView: UIVisualEffectView = {
let effect = UIBlurEffect(style: .dark)
let view = UIVisualEffectView(effect: effect)
view.alpha = blurEffectAlpha
return view
}()
// MARK: - Initialization
override init(presentedViewController: UIViewController, presenting presentingViewController: UIViewController?) {
super.init(presentedViewController: presentedViewController, presenting: presentingViewController)
presentedViewController.modalPresentationStyle = .custom
}
// MARK: - Overrides
override var presentedView: UIView? {
return presentationWrappingView
}
override func presentationTransitionWillBegin() {
guard let containerView = containerView else { return }
let presentationWrapperView = createPresentationWrapperView()
presentationWrappingView = presentationWrapperView
setupDimmingView(in: containerView)
let transitionCoordinator = presentingViewController.transitionCoordinator
dimmingView.alpha = 0.0
transitionCoordinator?.animate(alongsideTransition: { [weak self] _ in
self?.dimmingView.alpha = 1
}, completion: nil)
}
override func presentationTransitionDidEnd(_ completed: Bool) {
if !completed {
presentationWrappingView = nil
dimmingView.removeFromSuperview()
}
}
override func dismissalTransitionWillBegin() {
let transitionCoordinator = presentingViewController.transitionCoordinator
transitionCoordinator?.animate(alongsideTransition: { [weak self] _ in
self?.dimmingView.alpha = 0
}, completion: nil)
}
override func dismissalTransitionDidEnd(_ completed: Bool) {
if completed {
presentationWrappingView = nil
dimmingView.removeFromSuperview()
}
}
override func preferredContentSizeDidChange(forChildContentContainer container: UIContentContainer) {
super.preferredContentSizeDidChange(forChildContentContainer: container)
if container === presentedViewController {
containerView?.setNeedsLayout()
}
}
override func size(forChildContentContainer container: UIContentContainer, withParentContainerSize parentSize: CGSize) -> CGSize {
if container === presentedViewController {
return container.preferredContentSize
}
return super.size(forChildContentContainer: container, withParentContainerSize: parentSize)
}
override var frameOfPresentedViewInContainerView: CGRect {
guard let containerView = containerView else { return .zero }
let containerViewBounds = containerView.bounds
let presentedViewContentSize = size(forChildContentContainer: presentedViewController, withParentContainerSize: containerViewBounds.size)
var presentedViewControllerFrame = containerViewBounds
presentedViewControllerFrame.size.height = presentedViewContentSize.height
presentedViewControllerFrame.origin.y = containerViewBounds.maxY - presentedViewContentSize.height
return presentedViewControllerFrame
}
override func containerViewWillLayoutSubviews() {
super.containerViewWillLayoutSubviews()
dimmingView.frame = containerView?.bounds ?? .zero
presentationWrappingView?.frame = frameOfPresentedViewInContainerView
}
// MARK: - Private Methods
private func createPresentationWrapperView() -> UIView {
let wrapperView = UIView(frame: frameOfPresentedViewInContainerView)
wrapperView.layer.shadowOpacity = Constants.shadowOpacity
wrapperView.layer.shadowRadius = Constants.shadowRadius
wrapperView.layer.shadowOffset = Constants.shadowOffset
let roundedCornerView = createRoundedCornerView(in: wrapperView)
let presentedControllerWrapperView = createPresentedControllerWrapperView(in: roundedCornerView)
if let presentedView = super.presentedView {
presentedView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
presentedView.frame = presentedControllerWrapperView.bounds
presentedControllerWrapperView.addSubview(presentedView)
}
return wrapperView
}
private func createRoundedCornerView(in wrapperView: UIView) -> UIView {
let roundedCornerView = UIView(frame: wrapperView.bounds.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: -customRadius, right: 0)))
roundedCornerView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
roundedCornerView.layer.cornerRadius = customRadius
roundedCornerView.layer.masksToBounds = true
wrapperView.addSubview(roundedCornerView)
return roundedCornerView
}
private func createPresentedControllerWrapperView(in roundedCornerView: UIView) -> UIView {
let wrapperView = UIView(frame: roundedCornerView.bounds.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: customRadius, right: 0)))
wrapperView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
roundedCornerView.addSubview(wrapperView)
return wrapperView
}
private func setupDimmingView(in containerView: UIView) {
dimmingView.frame = containerView.bounds
visualEffectView.frame = dimmingView.bounds
dimmingView.addSubview(visualEffectView)
visualEffectView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
containerView.addSubview(dimmingView)
}
// MARK: - Actions
@objc private func dimmingViewTapped(_: UITapGestureRecognizer) {
dimmingViewTapAction?()
}
}
// MARK: - UIViewControllerAnimatedTransitioning
extension YHBottomPresentationController: UIViewControllerAnimatedTransitioning {
func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
return transitionContext?.isAnimated == true ? Constants.animationDuration : 0
}
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
let state: TransitionState = (transitionContext.viewController(forKey: .from) === presentingViewController) ? .presenting : .dismissing
guard let view = state == .presenting ? transitionContext.view(forKey: .to) : transitionContext.view(forKey: .from) else { return }
let initialFrame = view.frame
let finalFrame = state == .presenting ? transitionContext.finalFrame(for: presentedViewController) : initialFrame.offsetBy(dx: 0, dy: initialFrame.height)
view.frame = state == .presenting ? initialFrame : finalFrame
let animator = UIViewPropertyAnimator(duration: Constants.animationDuration, curve: .easeInOut) {
view.frame = state == .presenting ? finalFrame : initialFrame
}
animator.addCompletion { _ in
transitionContext.completeTransition(!transitionContext.transitionWasCancelled)
}
animator.startAnimation()
}
}
// MARK: - UIViewControllerTransitioningDelegate
extension YHBottomPresentationController: UIViewControllerTransitioningDelegate {
func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? {
assert(presentedViewController === presented, "You didn't initialize \(self) with the correct presentedViewController. Expected \(presented), got \(presentedViewController).")
return self
}
func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return self
}
func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return self
}
}
//
// YHDashLineView.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDashLineView: UIView {
private var strokeColor: CGColor = UIColor(hex: 0x121A26, alpha: 0.12).cgColor
private var lineWidth: CGFloat = 1
private var lineDashPattern: [NSNumber] = [2, 2]
init(strokeColor: CGColor = UIColor(hex: 0x121A26, alpha: 0.12).cgColor, lineWidth: CGFloat = 1, lineDashPattern: [NSNumber] = [2, 2]) {
self.strokeColor = strokeColor
self.lineWidth = lineWidth
self.lineDashPattern = lineDashPattern
super.init(frame: CGRect.zero)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func layoutSubviews() {
super.layoutSubviews()
// 移除之前的层,避免重复添加
layer.sublayers?.filter { $0 is CAShapeLayer }.forEach { $0.removeFromSuperlayer() }
let shapeLayer = CAShapeLayer()
shapeLayer.strokeColor = strokeColor
shapeLayer.lineWidth = lineWidth
shapeLayer.lineDashPattern = lineDashPattern // 实线长度,间隔长度
let path = CGMutablePath()
path.move(to: CGPoint(x: 0, y: bounds.midY))
path.addLine(to: CGPoint(x: bounds.width, y: bounds.midY))
shapeLayer.path = path
layer.addSublayer(shapeLayer)
}
}
//
// YHHKVisaRenewalPaymentStepView.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKVisaRenewalPaymentStepView: UIView {
private let stepNames: [String] = ["确认在港", "复制档案号", "官网缴费", "查看签证"]
private let stepLabelHeight: CGFloat = 18
private lazy var firstStepLabel: UILabel = {
return getStepLabel("1")
}()
private lazy var secondStepLabel: UILabel = {
return getStepLabel("2")
}()
private lazy var thirdStepLabel: UILabel = {
return getStepLabel("3")
}()
private lazy var fourthStepLabel: UILabel = {
return getStepLabel("4")
}()
private lazy var firstStepNameLabel: UILabel = {
return getStepNameLabel(stepNames[0])
}()
private lazy var secondStepNameLabel: UILabel = {
return getStepNameLabel(stepNames[1])
}()
private lazy var thirdStepNameLabel: UILabel = {
return getStepNameLabel(stepNames[2])
}()
private lazy var fourthStepNameLabel: UILabel = {
return getStepNameLabel(stepNames[3])
}()
private lazy var firstDashLine: YHDashLineView = {
return getDashLineView()
}()
private lazy var secondDashLine: YHDashLineView = {
return getDashLineView()
}()
private lazy var thirdDashLine: YHDashLineView = {
return getDashLineView()
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupViews()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension YHHKVisaRenewalPaymentStepView {
private func setupViews() {
backgroundColor = .white
addSubviews([firstStepLabel, secondStepLabel, thirdStepLabel, fourthStepLabel])
addSubviews([firstDashLine, secondDashLine, thirdDashLine])
addSubviews([firstStepNameLabel, secondStepNameLabel, thirdStepNameLabel, fourthStepNameLabel])
firstStepLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(50)
make.width.height.equalTo(stepLabelHeight)
}
fourthStepLabel.snp.makeConstraints { make in
make.top.equalTo(firstStepLabel.snp.top)
make.right.equalToSuperview().offset(-50)
make.width.height.equalTo(stepLabelHeight)
}
secondStepLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.width.height.equalTo(stepLabelHeight)
}
thirdStepLabel.snp.makeConstraints { make in
make.top.equalTo(firstStepLabel.snp.top)
make.width.height.equalTo(stepLabelHeight)
}
firstDashLine.snp.makeConstraints { make in
make.left.equalTo(firstStepLabel.snp.right).offset(8)
make.right.equalTo(secondStepLabel.snp.left).offset(-8)
make.height.equalTo(1)
make.centerY.equalTo(firstStepLabel)
}
secondDashLine.snp.makeConstraints { make in
make.left.equalTo(secondStepLabel.snp.right).offset(8)
make.right.equalTo(thirdStepLabel.snp.left).offset(-8)
make.width.equalTo(firstDashLine)
make.height.equalTo(1)
make.centerY.equalTo(firstStepLabel)
}
thirdDashLine.snp.makeConstraints { make in
make.left.equalTo(thirdStepLabel.snp.right).offset(8)
make.right.equalTo(fourthStepLabel.snp.left).offset(-8)
make.width.equalTo(firstDashLine)
make.height.equalTo(1)
make.centerY.equalTo(firstStepLabel)
}
firstStepNameLabel.snp.makeConstraints { make in
make.top.equalTo(firstStepLabel.snp.bottom).offset(6)
make.centerX.equalTo(firstStepLabel.snp.centerX)
make.bottom.equalToSuperview().offset(-16)
}
secondStepNameLabel.snp.makeConstraints { make in
make.top.equalTo(secondStepLabel.snp.bottom).offset(6)
make.centerX.equalTo(secondStepLabel.snp.centerX)
make.bottom.equalToSuperview().offset(-16)
}
thirdStepNameLabel.snp.makeConstraints { make in
make.top.equalTo(thirdStepLabel.snp.bottom).offset(6)
make.centerX.equalTo(thirdStepLabel.snp.centerX)
make.bottom.equalToSuperview().offset(-16)
}
fourthStepNameLabel.snp.makeConstraints { make in
make.top.equalTo(fourthStepLabel.snp.bottom).offset(6)
make.centerX.equalTo(fourthStepLabel.snp.centerX)
make.bottom.equalToSuperview().offset(-16)
}
}
private func getStepLabel(_ title: String) -> UILabel {
let label = UILabel()
label.font = UIFont(name: "DIN Alternate Bold", size: 12)
label.textColor = .mainTextColor70
label.backgroundColor = UIColor(hex: 0xf4f6fa)
label.layer.cornerRadius = stepLabelHeight / 2.0
label.clipsToBounds = true
label.text = title
label.textAlignment = .center
return label
}
private func getStepNameLabel(_ title: String) -> UILabel {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = .mainTextColor70
label.text = title
return label
}
private func getDashLineView() -> YHDashLineView {
let view = YHDashLineView(strokeColor: UIColor(hex: 0x121A26, alpha: 0.12).cgColor, lineWidth: 1, lineDashPattern: [2, 2])
return view
}
}
//
// YHVisaRenewalGuideHeaderCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHVisaRenewalGuideHeaderCell: UITableViewCell {
static let cellReuseIdentifier = "YHVisaRenewalGuideHeaderCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var tipIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "right_arrow_black_20")
return view
}()
private lazy var tipTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var tipDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var subContainerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 8, corner: .none)
view.backgroundColor = .white
return view
}()
private lazy var warrnIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "right_arrow_black_20")
return view
}()
private lazy var warrnDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor(hexString: "#222222")
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String?, detail: String?) {
// infoTitleLabel.text = title
// infoDetailLabel.text = detail
}
func setupCellASAttributedInfo(title: String?, detail: ASAttributedString?, detailColor: UIColor = .mainTextColor50) {
// infoTitleLabel.text = title
// infoDetailLabel.textColor = detailColor
// infoDetailLabel.attributed.text = detail
}
}
extension YHVisaRenewalGuideHeaderCell {
private func setupUI() {
selectionStyle = .none
backgroundColor = .clear
contentView.addSubview(subContainerView)
// subContainerView.snp.makeConstraints { make in
// make.edges.equalToSuperview()
// }
//
// bottomLineView.snp.makeConstraints { make in
// make.bottom.equalToSuperview()
// make.left.equalToSuperview().offset(18)
// make.right.equalToSuperview().offset(-18)
// make.height.equalTo(0.5)
// }
}
}
//
// YHResignAppointTimeViewController.swift
// galaxy
//
// Created by edy on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
import SwifterSwift
class YHResignAppointTimeViewController: YHBaseViewController {
var familyArr: [String] = ["", "", "", ""]
lazy var tableView: UITableView = {
let tableView = UITableView(frame: CGRect.zero, style:.grouped)
if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0.0
}
tableView.estimatedSectionHeaderHeight = 0.1
tableView.estimatedSectionFooterHeight = 16.0
tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.bounces = false
tableView.register(YHResignAppointTimeCell.self, forCellReuseIdentifier: YHResignAppointTimeCell.cellReuseIdentifier)
tableView.delegate = self
tableView.dataSource = self
return tableView
}()
lazy var tipsBtn: UIButton = {
let button = UIButton()
button.setTitle("递交提示", for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 11)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setImage(UIImage(named: "resign_appoint_tips_btn"), for: .normal)
button.centerTextAndImage(imageAboveText: true, spacing: 0.0)
return button
}()
lazy var submitBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .brandMainColor
btn.setTitle("确认提交", for: .normal)
btn.setTitleColor(.white, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
btn.addTarget(self, action: #selector(didSubmitBtnClicked), for: .touchUpInside)
btn.layer.cornerRadius = kCornerRadius3
return btn
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.addSubview(tipsBtn)
view.addSubview(submitBtn)
tipsBtn.snp.makeConstraints { make in
make.left.equalTo(22)
make.width.equalTo(44)
make.height.equalTo(48)
make.centerY.equalTo(submitBtn)
}
submitBtn.snp.makeConstraints { make in
make.left.equalTo(tipsBtn.snp.right).offset(22)
make.right.equalTo(-20)
make.top.equalTo(8)
make.height.equalTo(48)
}
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "预约在港递交时间"
self.gk_navigationBar.backgroundColor = .white
self.view.backgroundColor = .init(hex: 0xF8F9FB)
self.view.addSubview(tableView)
self.view.addSubview(bottomView)
self.tableView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(k_Height_NavigationtBarAndStatuBar+16)
make.bottom.equalTo(bottomView.snp.top)
}
self.bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(98)
}
}
@objc func didSubmitBtnClicked() {
}
}
extension YHResignAppointTimeViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return familyArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHResignAppointTimeCell.cellReuseIdentifier, for: indexPath) as! YHResignAppointTimeCell
if 0 <= indexPath.row && indexPath.row < familyArr.count {
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.row && indexPath.row < familyArr.count {
let model = familyArr[indexPath.row]
}
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 0.1
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 16
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
return view
}
}
//
// YHResignAppointTimeCell.swift
// galaxy
//
// Created by edy on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHResignAppointTimeCell: UITableViewCell {
static let cellReuseIdentifier = "YHResignFamilyMemberInfoCell"
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
lazy var titleLabel: UILabel = {
let titleLabel = UILabel(frame: CGRect(x: 18, y: 16, width: KScreenWidth, height: 24.0))
let mustTag: ASAttributedString = .init("* ", .font(UIFont.PFSC_M(ofSize: 17)),.foreground(UIColor.failColor))
var title: ASAttributedString = .init("请您确认以下信息", .font(UIFont.PFSC_M(ofSize: 17)),.foreground(UIColor.mainTextColor))
title = mustTag + title
titleLabel.attributed.text = title
return titleLabel
}()
lazy var submitTimeItemView: YHResignAppointTimeItemView = {
let view = YHResignAppointTimeItemView(frame: .zero)
view.title = "预约在港递交时间"
view.placeHolder = "请选择"
view.isNeedShowErrorTips = false
view.errorTips = "请选择在港递交时间"
view.detail = ""
view.updateLineMargin(-18.0)
view.clickBlock = {
[weak self] in
guard let self = self else { return }
}
return view
}()
lazy var leaveTimeItemView: YHResignAppointTimeItemView = {
let view = YHResignAppointTimeItemView(frame: .zero)
view.title = "预计离港时间"
view.placeHolder = "请选择"
view.errorTips = "请选择离港时间"
view.isNeedShowErrorTips = false
view.detail = ""
view.clickBlock = {
[weak self] in
guard let self = self else { return }
}
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
self.selectionStyle = .none
self.backgroundColor = .clear
self.contentView.backgroundColor = .clear
self.contentView.addSubview(whiteContentView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(submitTimeItemView)
whiteContentView.addSubview(leaveTimeItemView)
whiteContentView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.bottom.equalTo(-16)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(16)
make.height.equalTo(24)
}
submitTimeItemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
}
leaveTimeItemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(submitTimeItemView.snp.bottom)
make.bottom.equalToSuperview()
}
}
}
//
// YHResignAppointTimeItemView.swift
// galaxy
//
// Created by edy on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHResignAppointTimeItemView: UIView {
var titleMaxWidth = 112.0
var clickBlock: (()->())?
var title: String = "" {
didSet {
titleLabel.text = title
}
}
var placeHolder: String = ""
var errorTips: String = "" {
didSet {
errorLabel.text = errorTips
}
}
var isNeedShowErrorTips: Bool = false {
didSet {
errorLabel.isHidden = !isNeedShowErrorTips
errorLabel.snp.remakeConstraints { make in
make.top.equalTo(detailLabel.snp.bottom).offset(isNeedShowErrorTips ? 5 : 0)
make.left.equalTo(titleLabel)
make.right.equalTo(0)
make.bottom.equalTo(-16)
if !isNeedShowErrorTips {
make.height.equalTo(0)
}
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
func updateLineMargin(_ margin: CGFloat) {
lineView.snp.updateConstraints { make in
make.left.equalTo(margin)
make.right.equalTo(-margin)
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
var detail: String = "" {
didSet {
if detail.isEmpty {
// 显示placeHolder
detailLabel.text = self.placeHolder
detailLabel.textColor = .placeHolderColor
detailLabel.textAlignment = .left
return
}
detailLabel.text = detail
detailLabel.textColor = .mainTextColor
detailLabel.textAlignment = .left
}
}
// var isShowDetailOneline:Bool = false {
// didSet {
// detailLabel.textAlignment = .left
// detailLabel.numberOfLines = isShowDetailOneline ? 1 : 0
// detailLabel.snp.remakeConstraints { make in
// make.top.equalTo(16)
// make.left.equalTo(titleLabel.snp.right).offset(0)
// make.right.equalTo(arrowImgView.snp.left)
// if isShowDetailOneline {
// make.height.equalTo(20)
// }
// }
//
// errorLabel.snp.remakeConstraints { make in
// make.top.equalTo(detailLabel.snp.bottom).offset(0)
// make.left.equalTo(titleLabel)
// make.right.equalTo(0)
// make.bottom.equalTo(-16)
// }
//
// self.setNeedsLayout()
// self.layoutIfNeeded()
// }
// }
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
private lazy var detailLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
private lazy var errorLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = .failColor
return label
}()
lazy var arrowImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "family_info_arrow"))
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@objc func didSelectView() {
clickBlock?()
}
func createUI() {
self.addSubview(titleLabel)
self.addSubview(detailLabel)
self.addSubview(arrowImgView)
self.addSubview(lineView)
self.addSubview(errorLabel)
let tap = UITapGestureRecognizer(target: self, action: #selector(didSelectView))
self.addGestureRecognizer(tap)
lineView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.equalTo(0)
make.height.equalTo(0.5)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(0)
make.top.equalTo(16)
make.width.equalTo(titleMaxWidth)
}
detailLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(titleLabel.snp.right).offset(28.0)
make.right.equalTo(arrowImgView.snp.left)
}
errorLabel.snp.makeConstraints { make in
make.top.equalTo(detailLabel.snp.bottom).offset(0)
make.left.equalTo(titleLabel)
make.right.equalTo(0)
make.bottom.equalTo(-16)
}
arrowImgView.snp.makeConstraints { make in
make.width.height.equalTo(22)
make.top.equalTo(15)
make.right.equalTo(0)
}
}
}
//
// YHResignAppointTipsView.swift
// galaxy
//
// Created by edy on 2024/10/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHResignAppointTipsView: UIView {
var confirmBlock:(()->())?
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = UIColor.init(hex: 0x000000, alpha: 0.68)
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textAlignment = .center
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "递交提示"
return label
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x94A3B8, alpha: 0.14)
return view
}()
lazy var textImgView: UIImageView = {
let imgView = UIImageView(image: UIImage(named: "resign_appoint_tips"))
return imgView
}()
lazy var confirmBtn: UIButton = {
let button = UIButton()
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
button.setTitle("我知道了", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.backgroundColor = .brandMainColor
button.addTarget(self, action: #selector(didConfirmBtnClicked), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
return button
}()
static func alertView() -> YHResignAppointTipsView {
let view = YHResignAppointTipsView(frame: UIScreen.main.bounds)
return view
}
@objc func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
@objc func dismiss() {
self.removeFromSuperview()
}
@objc func didConfirmBtnClicked() {
confirmBlock?()
self.dismiss()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
func createUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(lineView)
whiteContentView.addSubview(textImgView)
whiteContentView.addSubview(confirmBtn)
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(38)
make.right.equalTo(-38)
make.centerY.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.height.equalTo(24)
make.left.equalTo(21)
make.right.equalTo(-21)
}
lineView.snp.makeConstraints { make in
make.left.right.equalTo(0)
make.height.equalTo(0.5)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
}
textImgView.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.height.equalTo(textImgView.snp.width).multipliedBy(260.0/257.0)
make.top.equalTo(lineView.snp.bottom).offset(18)
}
confirmBtn.snp.makeConstraints { make in
make.top.equalTo(textImgView.snp.bottom).offset(32)
make.left.equalTo(21)
make.right.equalTo(-21)
make.bottom.equalTo(-16)
make.height.equalTo(45)
}
}
}
//
// YHResignInfoConfirmViewController.swift
// galaxy
//
// Created by edy on 2024/10/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHResignInfoConfirmViewController: YHBaseViewController {
// YHApplicantInfoModel
var familyArr: [String] = ["", "", "", ""]
lazy var tableView: UITableView = {
let tableView = UITableView(frame: CGRect.zero, style:.grouped)
if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0.0
}
tableView.estimatedSectionHeaderHeight = 52.0
tableView.estimatedSectionFooterHeight = 0.1
tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.bounces = false
tableView.register(YHResignFamilyMemberInfoCell.self, forCellReuseIdentifier: YHResignFamilyMemberInfoCell.cellReuseIdentifier)
tableView.delegate = self
tableView.dataSource = self
tableView.tableHeaderView = headerView
return tableView
}()
lazy var headerView: UIView = {
let view = UIView(frame: CGRectMake(0, 0, KScreenWidth-32, (KScreenWidth-32.0) * (109.0/343.0) + 16.0))
let tipsImgView = UIImageView(image: UIImage(named: "resign_risk_warning"))
view.addSubview(tipsImgView)
tipsImgView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-16.0)
}
return view
}()
lazy var bottomBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .brandMainColor
btn.setTitle("确认修改,下一步", for: .normal)
btn.setTitleColor(.white, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
btn.addTarget(self, action: #selector(didBottomBtnClicked), for: .touchUpInside)
btn.layer.cornerRadius = kCornerRadius3
return btn
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.addSubview(bottomBtn)
bottomBtn.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(8)
make.height.equalTo(46)
}
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "续签信息确认"
self.gk_navigationBar.backgroundColor = .white
self.view.backgroundColor = .init(hex: 0xF8F9FB)
self.view.addSubview(self.tableView)
self.view.addSubview(bottomView)
self.tableView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(k_Height_NavigationtBarAndStatuBar+16)
make.bottom.equalTo(bottomView.snp.top)
}
self.bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(98)
}
}
@objc func didBottomBtnClicked() {
}
}
extension YHResignInfoConfirmViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return familyArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHResignFamilyMemberInfoCell.cellReuseIdentifier, for: indexPath) as! YHResignFamilyMemberInfoCell
if 0 <= indexPath.row && indexPath.row < familyArr.count {
let model = familyArr[indexPath.row]
cell.updateLineMargin(indexPath.row == 0 ? 0.0 : 18.0)
if indexPath.row == familyArr.count-1 {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue)
cell.createCorner(CGSizeMake(kCornerRadius6, kCornerRadius6), corner)
} else {
cell.layer.mask = nil
}
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 69.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.row && indexPath.row < familyArr.count {
let model = familyArr[indexPath.row]
}
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 52.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 0.1
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
view.clipsToBounds = true
let cornerView = UIView(frame: CGRectMake(0, 0, tableView.width, 58.0))
cornerView.backgroundColor = .white
cornerView.layer.cornerRadius = kCornerRadius6
cornerView.clipsToBounds = true
view.addSubview(cornerView)
let titleLabel = UILabel(frame: CGRect(x: 18, y: 16, width: KScreenWidth, height: 24.0))
let mustTag: ASAttributedString = .init("* ", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.failColor))
var title: ASAttributedString = .init("续签信息核实", .font(UIFont.PFSC_M(ofSize: 17)),.foreground(UIColor.mainTextColor))
title = mustTag + title
titleLabel.attributed.text = title
cornerView.addSubview(titleLabel)
return view
}
}
//
// YHResignFamilyMemberInfoCell.swift
// galaxy
//
// Created by edy on 2024/10/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHResignFamilyMemberInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHResignFamilyMemberInfoCell"
func updateModel(_ model: YHApplicantInfoModel) {
self.relationLabel.text = model.info.getRelation()
self.nameLabel.text = model.info.name
self.pinyinLabel.text = "\(model.info.familyName) \(model.info.givenName)"
self.statusLabel.text = model.confirmStatus == 1 ? "已确认" : "待核对"
let textColor: UIColor = model.confirmStatus == 1 ? .init(hex: 0x3CC694) : .brandMainColor
self.statusLabel.textColor = textColor
let img = UIImage(named: "family_info_status_arrow")?.withRenderingMode(.alwaysTemplate)
self.arrowImgView.image = img
self.arrowImgView.tintColor = textColor
}
func updateLineMargin(_ margin: CGFloat) {
lineView.snp.updateConstraints { make in
make.left.equalTo(margin)
make.right.equalTo(-margin)
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var relationLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.text = "主申人"
label.textColor = UIColor.mainTextColor
return label
}()
lazy var nameLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "张山峰"
label.textColor = UIColor.mainTextColor
return label
}()
lazy var pinyinLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.text = "ZHANG SHANGFENG"
label.textColor = UIColor.mainTextColor(alpha: 0.5)
return label
}()
lazy var statusLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.text = "待核对"
label.textColor = UIColor.brandMainColor
return label
}()
lazy var arrowImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "family_info_status_arrow"))
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
self.selectionStyle = .none
self.backgroundColor = .white
self.contentView.backgroundColor = .white
contentView.addSubview(relationLabel)
contentView.addSubview(nameLabel)
contentView.addSubview(pinyinLabel)
contentView.addSubview(statusLabel)
contentView.addSubview(arrowImgView)
contentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalToSuperview()
make.height.equalTo(0.5)
}
relationLabel.snp.makeConstraints { make in
make.left.equalTo(18.0)
make.width.equalTo(42)
make.centerY.equalToSuperview()
}
nameLabel.snp.makeConstraints { make in
make.left.equalTo(relationLabel.snp.right).offset(60)
make.right.equalTo(statusLabel.snp.left).offset(-14)
make.top.equalTo(16)
make.height.equalTo(20)
}
pinyinLabel.snp.makeConstraints { make in
make.left.equalTo(nameLabel)
make.right.equalTo(nameLabel)
make.top.equalTo(nameLabel.snp.bottom)
make.height.equalTo(17)
}
arrowImgView.snp.makeConstraints { make in
make.width.height.equalTo(20)
make.right.equalTo(-18)
make.centerY.equalToSuperview()
}
statusLabel.snp.makeConstraints { make in
make.width.equalTo(56)
make.right.equalTo(arrowImgView.snp.left)
make.height.equalTo(20)
make.centerY.equalToSuperview()
}
}
}
......@@ -341,6 +341,15 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
return
}
if true {
YHResignAppointTipsView.alertView().show()
// let vc = YHResignInfoConfirmViewController()
// self.navigationController?.pushViewController(vc)
return
}
let item: PersonalModuleItem = items[indexPath.row]
switch item.type {
case .myCard://我的名片
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "info_location copy@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "info_location copy@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033194705@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033194705@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