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
dc76734c
Commit
dc76734c
authored
Aug 12, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 档案号显示
parent
f884bc00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
YHPrincipleProfileListCell.swift
...ce/PrincipleBatch(原则批)/V/YHPrincipleProfileListCell.swift
+16
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/PrincipleBatch(原则批)/V/YHPrincipleProfileListCell.swift
View file @
dc76734c
...
@@ -36,6 +36,8 @@ class YHPrincipleProfileItemView: UIView {
...
@@ -36,6 +36,8 @@ class YHPrincipleProfileItemView: UIView {
lazy
var
titleLabel
:
UILabel
=
{
lazy
var
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
numberOfLines
=
0
label
.
lineBreakMode
=
.
byCharWrapping
label
.
textColor
=
UIColor
.
mainTextColor
(
alpha
:
0.7
)
label
.
textColor
=
UIColor
.
mainTextColor
(
alpha
:
0.7
)
label
.
textAlignment
=
.
left
label
.
textAlignment
=
.
left
return
label
return
label
...
@@ -202,6 +204,7 @@ class YHPrincipleProfileListCell: UITableViewCell {
...
@@ -202,6 +204,7 @@ class YHPrincipleProfileListCell: UITableViewCell {
var
lastItemView
:
UIView
=
listTitleLabel
var
lastItemView
:
UIView
=
listTitleLabel
for
(
index
,
item
)
in
items
.
enumerated
()
{
for
(
index
,
item
)
in
items
.
enumerated
()
{
let
itemView
=
YHPrincipleProfileItemView
(
frame
:
.
zero
)
let
itemView
=
YHPrincipleProfileItemView
(
frame
:
.
zero
)
let
viewHeight
=
self
.
getHeight
(
text
:
item
.
name
,
font
:
itemView
.
titleLabel
.
font
,
width
:
KScreenWidth
-
118.0
)
itemView
.
updateModel
(
item
)
itemView
.
updateModel
(
item
)
if
model
.
type
==
.
entry
{
if
model
.
type
==
.
entry
{
itemView
.
btnClick
=
{
itemView
.
btnClick
=
{
...
@@ -224,7 +227,7 @@ class YHPrincipleProfileListCell: UITableViewCell {
...
@@ -224,7 +227,7 @@ class YHPrincipleProfileListCell: UITableViewCell {
whiteView
.
addSubview
(
itemView
)
whiteView
.
addSubview
(
itemView
)
itemView
.
snp
.
makeConstraints
{
make
in
itemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
left
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
YHPrincipleProfileItemView
.
viewH
)
make
.
height
.
equalTo
(
viewHeight
)
make
.
top
.
equalTo
(
lastItemView
.
snp
.
bottom
)
.
offset
(
16.0
)
make
.
top
.
equalTo
(
lastItemView
.
snp
.
bottom
)
.
offset
(
16.0
)
if
index
==
items
.
count
-
1
{
if
index
==
items
.
count
-
1
{
make
.
bottom
.
equalTo
(
-
16.0
)
make
.
bottom
.
equalTo
(
-
16.0
)
...
@@ -289,4 +292,16 @@ class YHPrincipleProfileListCell: UITableViewCell {
...
@@ -289,4 +292,16 @@ class YHPrincipleProfileListCell: UITableViewCell {
make
.
bottom
.
equalTo
(
-
32
)
make
.
bottom
.
equalTo
(
-
32
)
}
}
}
}
func
getHeight
(
text
:
String
,
font
:
UIFont
,
width
:
CGFloat
)
->
CGFloat
{
let
size
=
CGSize
.
init
(
width
:
width
,
height
:
CGFloat
(
MAXFLOAT
))
let
dic
=
[
NSAttributedString
.
Key
.
font
:
font
]
let
strSize
=
text
.
boundingRect
(
with
:
size
,
options
:
[
.
usesLineFragmentOrigin
],
attributes
:
dic
,
context
:
nil
)
.
size
var
height
=
CGSizeMake
(
strSize
.
width
,
ceil
(
strSize
.
height
))
.
height
if
height
<
20.0
{
var
height
=
20
}
return
ceil
(
height
)
}
}
}
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