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
a1416b2b
Commit
a1416b2b
authored
Mar 22, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的证件
parent
824b478e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
19 deletions
+33
-19
YHCertificateInfoCell.swift
...(服务中心)/MyCertificates(我的证书)/V/YHCertificateInfoCell.swift
+33
-19
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateInfoCell.swift
View file @
a1416b2b
...
...
@@ -12,7 +12,6 @@ import AttributedString
class
YHCertificateInfoCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHCertificateNameCell"
var
status
:
YHCertificateUploadStatus
=
.
preUpload
...
...
@@ -22,21 +21,7 @@ class YHCertificateInfoCell: UITableViewCell {
var
infoLabel
:
UILabel
!
var
statusLabel
:
UILabel
!
var
rightArrowImgV
:
UIImageView
!
private
lazy
var
templateLabel
:
UILabel
=
{
let
label
=
UILabel
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
48
,
height
:
16
))
label
.
text
=
"资料模版"
label
.
font
=
.
PFSC_M
(
ofSize
:
10
)
label
.
backgroundColor
=
.
brandMainColor8
label
.
textColor
=
.
brandMainColor
label
.
layer
.
cornerRadius
=
3
label
.
clipsToBounds
=
true
label
.
textAlignment
=
.
center
label
.
isUserInteractionEnabled
=
true
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
didTemplateBtnClicked
)
)
label
.
addGestureRecognizer
(
tap
)
return
label
}()
var
templateButton
:
UIButton
!
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
...
...
@@ -81,8 +66,10 @@ class YHCertificateInfoCell: UITableViewCell {
}
else
{
nameTextView
.
attributed
.
text
=
"""
\(
model
.
name
,
.
foreground
(
UIColor
.
mainTextColor
),
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
))
)
\(
.
view
(
templateLabel
,
.
original
(
.
center
))
)
\(
model
.
name
,
.
foreground
(
UIColor
.
mainTextColor
),
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
))
)
\(
.
view
(
templateButton
,
.
original
(
.
center
))
)
"""
}
infoLabel
.
text
=
"类型:
\(
model
.
typeName
)
所属人:
\(
model
.
nameExtra
.
userName
)
"
}
...
...
@@ -93,6 +80,16 @@ class YHCertificateInfoCell: UITableViewCell {
}
}
func
clicked
(
_
result
:
ASAttributedString
.
Action
.
Result
)
{
switch
result
.
content
{
case
.
string
(
let
value
):
print
(
"点击了文本:
\(
value
)
range:
\(
result
.
range
)
"
)
case
.
attachment
(
let
value
):
print
(
"点击了附件:
\(
value
)
range:
\(
result
.
range
)
"
)
}
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
...
...
@@ -112,8 +109,18 @@ class YHCertificateInfoCell: UITableViewCell {
nameTextView
.
isSelectable
=
false
whiteView
.
addSubview
(
nameTextView
)
templateButton
=
UIButton
()
templateButton
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
48
,
height
:
16
)
templateButton
.
setTitle
(
"资料模版"
,
for
:
.
normal
)
templateButton
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
10
)
templateButton
.
setTitleColor
(
.
brandMainColor
,
for
:
.
normal
)
templateButton
.
layer
.
cornerRadius
=
3
templateButton
.
clipsToBounds
=
true
templateButton
.
backgroundColor
=
.
brandMainColor8
templateButton
.
addTarget
(
self
,
action
:
#selector(
didTemplateBtnClicked
)
,
for
:
.
touchUpInside
)
nameTextView
.
attributed
.
text
=
"""
\(
"资料名称"
,
.
foreground
(
UIColor
.
mainTextColor
),
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
))
)
\(
.
view
(
templateLabel
,
.
original
(
.
center
))
)
\(
"资料名称"
,
.
foreground
(
UIColor
.
mainTextColor
),
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
))
)
\(
.
view
(
templateButton
,
.
original
(
.
center
)
)
)
)
"""
infoLabel
=
UILabel
()
...
...
@@ -164,5 +171,12 @@ class YHCertificateInfoCell: UITableViewCell {
make
.
centerY
.
equalToSuperview
()
}
}
override
func
hitTest
(
_
point
:
CGPoint
,
with
event
:
UIEvent
?)
->
UIView
?
{
let
hitView
=
super
.
hitTest
(
point
,
with
:
event
)
if
hitView
==
nameTextView
{
return
self
}
return
hitView
}
}
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