Commit 509a93e4 authored by Steven杜宇's avatar Steven杜宇

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

parents 3c3880df b1317023
...@@ -300,7 +300,6 @@ ...@@ -300,7 +300,6 @@
047AA3F82C5CC7B0009C4554 /* YHShareStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3F72C5CC7B0009C4554 /* YHShareStepView.swift */; }; 047AA3F82C5CC7B0009C4554 /* YHShareStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3F72C5CC7B0009C4554 /* YHShareStepView.swift */; };
047AA3FA2C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */; }; 047AA3FA2C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */; };
047AA3FC2C61EE7F009C4554 /* YHSignAppendStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */; }; 047AA3FC2C61EE7F009C4554 /* YHSignAppendStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */; };
047AA3FF2C646844009C4554 /* YHTypingEffectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3FE2C646844009C4554 /* YHTypingEffectViewController.swift */; };
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; }; 0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; };
0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */; }; 0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */; };
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; }; 048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; };
...@@ -950,7 +949,6 @@ ...@@ -950,7 +949,6 @@
047AA3F72C5CC7B0009C4554 /* YHShareStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHShareStepView.swift; sourceTree = "<group>"; }; 047AA3F72C5CC7B0009C4554 /* YHShareStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHShareStepView.swift; sourceTree = "<group>"; };
047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInvitationWithGiftsSelectItemView.swift; sourceTree = "<group>"; }; 047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInvitationWithGiftsSelectItemView.swift; sourceTree = "<group>"; };
047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSignAppendStepView.swift; sourceTree = "<group>"; }; 047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSignAppendStepView.swift; sourceTree = "<group>"; };
047AA3FE2C646844009C4554 /* YHTypingEffectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTypingEffectViewController.swift; sourceTree = "<group>"; };
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; }; 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateListVC.swift; sourceTree = "<group>"; }; 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateListVC.swift; sourceTree = "<group>"; };
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; }; 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; };
...@@ -1392,7 +1390,6 @@ ...@@ -1392,7 +1390,6 @@
children = ( children = (
0419A0992C48F87B00A5FCFA /* YHInvitationWithGiftsViewController.swift */, 0419A0992C48F87B00A5FCFA /* YHInvitationWithGiftsViewController.swift */,
047AA3D82C4A4A91009C4554 /* YHInvatationShareViewController.swift */, 047AA3D82C4A4A91009C4554 /* YHInvatationShareViewController.swift */,
047AA3FE2C646844009C4554 /* YHTypingEffectViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3967,7 +3964,6 @@ ...@@ -3967,7 +3964,6 @@
044CF8D42BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift in Sources */, 044CF8D42BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift in Sources */,
A567E5B02BD7643D00D5D5A0 /* YHHomeWebBottomView.swift in Sources */, A567E5B02BD7643D00D5D5A0 /* YHHomeWebBottomView.swift in Sources */,
045EEF0D2B9F171A0022A143 /* YHBasicInfoFillCell.swift in Sources */, 045EEF0D2B9F171A0022A143 /* YHBasicInfoFillCell.swift in Sources */,
047AA3FF2C646844009C4554 /* YHTypingEffectViewController.swift in Sources */,
044D0C1A2C22B40B00C5CF5E /* YHEditPersonalProfileViewController.swift in Sources */, 044D0C1A2C22B40B00C5CF5E /* YHEditPersonalProfileViewController.swift in Sources */,
047AA3E82C4A6D69009C4554 /* YHListViewController.swift in Sources */, 047AA3E82C4A6D69009C4554 /* YHListViewController.swift in Sources */,
048787D92BCF68530036E221 /* YHProgressView.swift in Sources */, 048787D92BCF68530036E221 /* YHProgressView.swift in Sources */,
......
...@@ -408,7 +408,6 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -408,7 +408,6 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
} }
// MARK: - KVO // MARK: - KVO
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
if keyPath == "estimatedProgress" { if keyPath == "estimatedProgress" {
self.progBar.alpha = 1.0 self.progBar.alpha = 1.0
......
//
// YHTypingEffectViewController.swift
// galaxy
//
// Created by EDY on 2024/8/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHTypingEffectViewController: YHBaseViewController {
private let label: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.systemFont(ofSize: 18)
label.textColor = .white
label.textAlignment = .center
return label
}()
private var displayLink: CADisplayLink?
private var currentIndex: Int = 0
private var fullText: String = "恭喜您申请的【优秀人才入境计划】"
private var centerText: String = "已获得港府的正式批准!"
private var lastText: String = "从递交资料伊始,经历了235天,感谢您这一路以来对银河的信赖与包容!"
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .black
view.addSubview(label)
label.frame = view.bounds
startTypingEffect()
}
private func startTypingEffect() {
displayLink = CADisplayLink(target: self, selector: #selector(handleDisplayLink(_:)))
displayLink?.preferredFramesPerSecond = Int(1 / 0.1) // 设置帧率
displayLink?.add(to: .current, forMode: .common)
}
@objc private func handleDisplayLink(_ displayLink: CADisplayLink) {
if currentIndex < fullText.count + centerText.count + lastText.count {
var index = currentIndex
if currentIndex >= fullText.count {
index = fullText.count
}
let attributedString = NSMutableAttributedString(string: String(fullText[..<index]),
attributes: [
NSAttributedString.Key.foregroundColor: UIColor.white,
NSAttributedString.Key.paragraphStyle: {
let style = NSMutableParagraphStyle()
style.lineSpacing = 8 //控制行间距
style.alignment = .center
return style
}()
])
var centerIndex = 0
if currentIndex >= fullText.count + centerText.count {
centerIndex = centerText.count
} else if currentIndex >= fullText.count {
centerIndex = currentIndex - fullText.count
}
let centerattributedString = NSMutableAttributedString(string: String(centerText[..<centerIndex]),
attributes: [
NSAttributedString.Key.foregroundColor: UIColor.red,
NSAttributedString.Key.paragraphStyle: {
let style = NSMutableParagraphStyle()
style.lineSpacing = 8 //控制行间距
style.alignment = .center
return style
}()
])
var lastIndex = 0
if currentIndex >= fullText.count + centerText.count {
lastIndex = currentIndex - fullText.count - centerText.count
}
let lastattributedString = NSMutableAttributedString(string: String(lastText[..<lastIndex]),
attributes: [
NSAttributedString.Key.foregroundColor: UIColor.white,
NSAttributedString.Key.paragraphStyle: {
let style = NSMutableParagraphStyle()
style.lineSpacing = 8 //控制行间距
style.alignment = .center
return style
}()
])
var result = NSMutableAttributedString(attributedString: attributedString)
result.append(centerattributedString)
result.append(lastattributedString)
label.attributedText = result
currentIndex += 1
} else {
displayLink.invalidate()
}
}
}
...@@ -87,6 +87,14 @@ class YHOffivialApprovalSuccessCheckView: UIView { ...@@ -87,6 +87,14 @@ class YHOffivialApprovalSuccessCheckView: UIView {
let testContent = "恭喜您申请的【优秀人才入境计划】已获得港府的正式批准!从递交资料伊始,经历了235天,感谢您这一路以来对银河的信赖与包容!" let testContent = "恭喜您申请的【优秀人才入境计划】已获得港府的正式批准!从递交资料伊始,经历了235天,感谢您这一路以来对银河的信赖与包容!"
var timer: Timer? var timer: Timer?
var counter = 0 var counter = 0
private var displayLink: CADisplayLink?
private var currentIndex: Int = 0
private var fullText: String = "恭喜您申请的【优秀人才入境计划】"
private var centerText: String = "已获得港府的正式批准!"
private var lastText: String = "从递交资料伊始,经历了235天,感谢您这一路以来对银河的信赖与包容!"
} }
extension YHOffivialApprovalSuccessCheckView { extension YHOffivialApprovalSuccessCheckView {
...@@ -162,7 +170,8 @@ private extension YHOffivialApprovalSuccessCheckView { ...@@ -162,7 +170,8 @@ private extension YHOffivialApprovalSuccessCheckView {
} completion: { flag in } completion: { flag in
self.titleLabel.isHidden = false self.titleLabel.isHidden = false
self.closeBtn.isHidden = false self.closeBtn.isHidden = false
self.startTyping() // self.startTyping()
self.startTypingEffect()
} }
} }
...@@ -207,4 +216,66 @@ private extension YHOffivialApprovalSuccessCheckView { ...@@ -207,4 +216,66 @@ private extension YHOffivialApprovalSuccessCheckView {
self.titleLabel.attributed.text = aa + bb + cc self.titleLabel.attributed.text = aa + bb + cc
} }
} }
private func startTypingEffect() {
displayLink = CADisplayLink(target: self, selector: #selector(handleDisplayLink(_:)))
displayLink?.preferredFramesPerSecond = Int(1 / 0.1) // 设置帧率
displayLink?.add(to: .current, forMode: .common)
}
@objc private func handleDisplayLink(_ displayLink: CADisplayLink) {
if currentIndex < fullText.count + centerText.count + lastText.count {
var index = currentIndex
if currentIndex >= fullText.count {
index = fullText.count
}
let attributedString = NSMutableAttributedString(string: String(fullText[..<index]),
attributes: [
NSAttributedString.Key.foregroundColor: UIColor(hex: 0x671908, alpha: 1.0),
NSAttributedString.Key.paragraphStyle: {
let style = NSMutableParagraphStyle()
style.lineSpacing = 6 //控制行间距
style.alignment = .left
return style
}()
])
var centerIndex = 0
if currentIndex >= fullText.count + centerText.count {
centerIndex = centerText.count
} else if currentIndex >= fullText.count {
centerIndex = currentIndex - fullText.count
}
let centerattributedString = NSMutableAttributedString(string: String(centerText[..<centerIndex]),
attributes: [
NSAttributedString.Key.foregroundColor: UIColor(hex: 0xAE1616, alpha: 1.0),
NSAttributedString.Key.paragraphStyle: {
let style = NSMutableParagraphStyle()
style.lineSpacing = 6 //控制行间距
style.alignment = .left
return style
}()
])
var lastIndex = 0
if currentIndex >= fullText.count + centerText.count {
lastIndex = currentIndex - fullText.count - centerText.count
}
let lastattributedString = NSMutableAttributedString(string: String(lastText[..<lastIndex]),
attributes: [
NSAttributedString.Key.foregroundColor: UIColor(hex: 0x671908, alpha: 1.0),
NSAttributedString.Key.paragraphStyle: {
let style = NSMutableParagraphStyle()
style.lineSpacing = 6 //控制行间距
style.alignment = .left
return style
}()
])
let result = NSMutableAttributedString(attributedString: attributedString)
result.append(centerattributedString)
result.append(lastattributedString)
self.titleLabel.attributedText = result
currentIndex += 1
} else {
displayLink.invalidate()
}
}
} }
...@@ -252,7 +252,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell { ...@@ -252,7 +252,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
fileImageView.image = UIImage(named: iconImgName) fileImageView.image = UIImage(named: iconImgName)
fileNameLabel.text = dataSource.writing_document.doc_sign.doc_type_name fileNameLabel.text = dataSource.writing_document.doc_sign.doc_type_name
if dataSource.writing_document.doc_sign.doc_type == 7 || dataSource.writing_document.doc_sign.doc_type == 8 { if dataSource.writing_document.doc_sign.doc_type == 7 || dataSource.writing_document.doc_sign.doc_type == 8 {
// shareButton.isHidden = false shareButton.isHidden = false
} }
} }
......
...@@ -264,7 +264,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell { ...@@ -264,7 +264,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
fileImageView.image = UIImage(named: iconImgName) fileImageView.image = UIImage(named: iconImgName)
fileNameLabel.text = dataSource.doc_type_name fileNameLabel.text = dataSource.doc_type_name
if dataSource.doc_type == 7 || dataSource.doc_type == 8 { if dataSource.doc_type == 7 || dataSource.doc_type == 8 {
// shareButton.isHidden = false shareButton.isHidden = false
} }
} }
......
...@@ -50,7 +50,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel { ...@@ -50,7 +50,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
} }
let item12 = YHWorkExperienceModel(id: .id14, isNeed: true, title: "企业人数规模", isUserKeyBoard: true, prompts: "请输入", message: "\(mainModel.company_member_total)", isShowPrompts: isShowPrompt, alertMessage:"请输入企业人数规模") let item12 = YHWorkExperienceModel(id: .id14, isNeed: true, title: "企业人数规模", isUserKeyBoard: true, prompts: "请输入", message: "\(mainModel.company_member_total)", isShowPrompts: isShowPrompt, alertMessage:"请输入企业人数规模")
let item13 = YHWorkExperienceModel(id: .id15, isNeed: false, title: "行政架构层级", isUserKeyBoard: false, prompts: "请输入", message: "\(mainModel.administrative_level)", type: .structure) let item13 = YHWorkExperienceModel(id: .id15, isNeed: false, title: "行政架构层级", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.administrative_level)", type: .structure)
let item14 = YHWorkExperienceModel(id: .id16, isNeed: true, title: "下属管理人数", isUserKeyBoard: true, prompts: "请输入", message: "\(mainModel.company_manage_total)", isShowPrompts: isShowPrompt, alertMessage:"请输入下属管理人数") let item14 = YHWorkExperienceModel(id: .id16, isNeed: true, title: "下属管理人数", isUserKeyBoard: true, prompts: "请输入", message: "\(mainModel.company_manage_total)", isShowPrompts: isShowPrompt, alertMessage:"请输入下属管理人数")
let item15 = YHWorkExperienceModel(id: .id17, isNeed: false, title: "公司营业额/港元 (近一年)", isUserKeyBoard: true, prompts: "请输入具体数字", message: "\(mainModel.turnover)") let item15 = YHWorkExperienceModel(id: .id17, isNeed: false, title: "公司营业额/港元 (近一年)", isUserKeyBoard: true, prompts: "请输入具体数字", message: "\(mainModel.turnover)")
let item16 = YHWorkExperienceModel(id: .id18, isNeed: false, title: "公司业务性质/范畴/所属行业", isUserKeyBoard: true, prompts: "请输入,100字内", message: mainModel.business_nature) let item16 = YHWorkExperienceModel(id: .id18, isNeed: false, title: "公司业务性质/范畴/所属行业", isUserKeyBoard: true, prompts: "请输入,100字内", message: mainModel.business_nature)
......
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