Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
aad4b8aa
Commit
aad4b8aa
authored
Aug 08, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
本地文件修改
parent
216bc044
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
104 deletions
+72
-104
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+0
-4
YHHomeWebViewController.swift
.../Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
+0
-1
YHTypingEffectViewController.swift
...ationWithGifts(邀请有礼)/C/YHTypingEffectViewController.swift
+0
-98
YHOffivialApprovalSuccessCheckView.swift
...ovalBatch(正式批)/V/YHOffivialApprovalSuccessCheckView.swift
+72
-1
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
aad4b8aa
...
...
@@ -300,7 +300,6 @@
047AA3F82C5CC7B0009C4554
/* YHShareStepView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
047AA3F72C5CC7B0009C4554
/* YHShareStepView.swift */
;
};
047AA3FA2C60739E009C4554
/* YHInvitationWithGiftsSelectItemView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
047AA3F92C60739E009C4554
/* YHInvitationWithGiftsSelectItemView.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 */
;
};
0480976D2BA158A1000B9DCA
/* YHCertificateListVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0480976C2BA158A1000B9DCA
/* YHCertificateListVC.swift */
;
};
048097712BA18D66000B9DCA
/* YHCertificateSearchBar.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
048097702BA18D66000B9DCA
/* YHCertificateSearchBar.swift */
;
};
...
...
@@ -949,7 +948,6 @@
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>"
;
};
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>"
;
};
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>"
;
};
...
...
@@ -1390,7 +1388,6 @@
children
=
(
0419A0992C48F87B00A5FCFA
/* YHInvitationWithGiftsViewController.swift */
,
047AA3D82C4A4A91009C4554
/* YHInvatationShareViewController.swift */
,
047AA3FE2C646844009C4554
/* YHTypingEffectViewController.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
...
...
@@ -3963,7 +3960,6 @@
044CF8D42BB6BCF700008CE8
/* YHSignatureUploadTableViewCell.swift in Sources */
,
A567E5B02BD7643D00D5D5A0
/* YHHomeWebBottomView.swift in Sources */
,
045EEF0D2B9F171A0022A143
/* YHBasicInfoFillCell.swift in Sources */
,
047AA3FF2C646844009C4554
/* YHTypingEffectViewController.swift in Sources */
,
044D0C1A2C22B40B00C5CF5E
/* YHEditPersonalProfileViewController.swift in Sources */
,
047AA3E82C4A6D69009C4554
/* YHListViewController.swift in Sources */
,
048787D92BCF68530036E221
/* YHProgressView.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
View file @
aad4b8aa
...
...
@@ -408,7 +408,6 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
}
// MARK: - KVO
override
func
observeValue
(
forKeyPath
keyPath
:
String
?,
of
object
:
Any
?,
change
:
[
NSKeyValueChangeKey
:
Any
]?,
context
:
UnsafeMutableRawPointer
?)
{
if
keyPath
==
"estimatedProgress"
{
self
.
progBar
.
alpha
=
1.0
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/InvitationWithGifts(邀请有礼)/C/YHTypingEffectViewController.swift
deleted
100644 → 0
View file @
216bc044
//
// 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
()
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService(客服段)/OfficialApprovalBatch(正式批)/V/YHOffivialApprovalSuccessCheckView.swift
View file @
aad4b8aa
...
...
@@ -87,6 +87,14 @@ class YHOffivialApprovalSuccessCheckView: UIView {
let
testContent
=
"恭喜您申请的【优秀人才入境计划】已获得港府的正式批准!从递交资料伊始,经历了235天,感谢您这一路以来对银河的信赖与包容!"
var
timer
:
Timer
?
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
{
...
...
@@ -162,7 +170,8 @@ private extension YHOffivialApprovalSuccessCheckView {
}
completion
:
{
flag
in
self
.
titleLabel
.
isHidden
=
false
self
.
closeBtn
.
isHidden
=
false
self
.
startTyping
()
// self.startTyping()
self
.
startTypingEffect
()
}
}
...
...
@@ -207,4 +216,66 @@ private extension YHOffivialApprovalSuccessCheckView {
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
()
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment