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
f9055eff
Commit
f9055eff
authored
Jun 28, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的好友显示
parent
1870246c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
YHMyGoodFriendsVC.swift
...y/Classes/Modules/Community(社区)/C/YHMyGoodFriendsVC.swift
+6
-3
YHMyFriendsCell.swift
...axy/Classes/Modules/Community(社区)/V/YHMyFriendsCell.swift
+9
-2
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMyGoodFriendsVC.swift
View file @
f9055eff
...
...
@@ -130,7 +130,6 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHMyFriendsCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHMyFriendsCell
self
.
createCorner
(
cell
:
cell
,
isLastCell
:
indexPath
.
row
==
self
.
friendsArr
.
count
-
1
)
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
friendsArr
.
count
{
let
friend
=
self
.
friendsArr
[
indexPath
.
row
]
cell
.
friendModel
=
friend
...
...
@@ -138,11 +137,15 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
willDisplay
cell
:
UITableViewCell
,
forRowAt
indexPath
:
IndexPath
)
{
if
indexPath
.
section
==
1
{
return
101
self
.
createCorner
(
cell
:
cell
,
isLastCell
:
indexPath
.
row
==
self
.
friendsArr
.
count
-
1
)
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
UITableView
.
automaticDimension
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyFriendsCell.swift
View file @
f9055eff
...
...
@@ -35,7 +35,14 @@ class YHMyFriendsCell: UITableViewCell {
text1
=
text1Arr
.
joined
(
separator
:
" | "
)
}
self
.
professionalLabel
.
text
=
text1
let
topMargin
=
self
.
friendModel
.
signature
.
isEmpty
?
0.0
:
6.0
let
detailHeight
=
self
.
friendModel
.
signature
.
isEmpty
?
0.0
:
18.0
self
.
detailLabel
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
detailHeight
)
make
.
top
.
equalTo
(
self
.
professionalLabel
.
snp
.
bottom
)
.
offset
(
topMargin
)
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
}
...
...
@@ -141,8 +148,8 @@ class YHMyFriendsCell: UITableViewCell {
self
.
detailLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
self
.
nameLabel
)
make
.
right
.
equalTo
(
self
.
lineView
)
make
.
height
.
equalTo
(
18.0
)
make
.
top
.
equalTo
(
self
.
professionalLabel
.
snp
.
bottom
)
.
offset
(
6
)
make
.
height
.
equalTo
(
18
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
16
)
}
}
...
...
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