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
3e37a608
Commit
3e37a608
authored
Nov 19, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 方案
parent
bb7dc287
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
YHImproveSchemeTemplateListCell.swift
...MyNewScheme(我的方案)/V/YHImproveSchemeTemplateListCell.swift
+3
-1
YHImproveSchemeTemplateListView.swift
...MyNewScheme(我的方案)/V/YHImproveSchemeTemplateListView.swift
+25
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/MyNewScheme(我的方案)/V/YHImproveSchemeTemplateListCell.swift
View file @
3e37a608
...
...
@@ -12,6 +12,8 @@ class YHImproveSchemeTemplateListCell: UITableViewCell {
static
let
cellReuseIdentifier
=
"YHImproveSchemeTemplateListCell"
var
model
=
YHSchemeTemplatesModel
()
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
let
tool
=
YHFilePreviewTool
(
targetVC
:
UIViewController
.
current
)
return
tool
...
...
@@ -77,7 +79,7 @@ class YHImproveSchemeTemplateListCell: UITableViewCell {
make
.
left
.
equalTo
(
0
)
make
.
top
.
equalTo
(
16
)
make
.
bottom
.
equalTo
(
-
16
)
make
.
right
.
equalTo
(
rightBtn
.
snp
.
left
)
.
offset
(
-
40
)
make
.
right
.
equalTo
(
rightBtn
.
snp
.
left
)
.
offset
(
-
15
)
}
rightBtn
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/MyNewScheme(我的方案)/V/YHImproveSchemeTemplateListView.swift
View file @
3e37a608
...
...
@@ -15,8 +15,24 @@ class YHImproveSchemeTemplateListView: UIView {
return
v
}
let
bottomFixHeight
=
102.0
var
items
:
[
YHSchemeTemplatesModel
]
=
[]
{
didSet
{
var
totalHeight
=
bottomFixHeight
+
52.0
for
item
in
items
{
let
height
=
getHeight
(
text
:
item
.
name
)
+
32.0
totalHeight
+=
height
}
totalHeight
=
floorl
(
totalHeight
)
if
totalHeight
>=
628.0
{
totalHeight
=
628.0
}
whiteView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
totalHeight
)
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
tableView
.
reloadData
()
}
}
...
...
@@ -138,6 +154,7 @@ extension YHImproveSchemeTemplateListView : UITableViewDelegate, UITableViewData
let
item
=
items
[
indexPath
.
row
]
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHImproveSchemeTemplateListCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHImproveSchemeTemplateListCell
cell
.
titleLabel
.
text
=
"
\(
indexPath
.
row
+
1
)
、
\(
item
.
name
)
"
cell
.
model
=
item
return
cell
}
...
...
@@ -168,7 +185,14 @@ extension YHImproveSchemeTemplateListView : UITableViewDelegate, UITableViewData
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
return
0.1
return
bottomFixHeight
}
func
getHeight
(
text
:
String
)
->
CGFloat
{
let
size
=
CGSize
.
init
(
width
:
KScreenWidth
-
115
,
height
:
CGFloat
(
MAXFLOAT
))
let
dic
=
[
NSAttributedString
.
Key
.
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
)]
let
strSize
=
text
.
boundingRect
(
with
:
size
,
options
:
[
.
usesLineFragmentOrigin
],
attributes
:
dic
,
context
:
nil
)
.
size
return
CGSizeMake
(
strSize
.
width
,
strSize
.
height
)
.
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