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
f07d7667
Commit
f07d7667
authored
Jun 27, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的名片
parent
c805e4af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
18 deletions
+25
-18
YHInterestTopicLayout.swift
...asses/Modules/Community(社区)/V/YHInterestTopicLayout.swift
+1
-1
YHMyInterestTopicCell.swift
...asses/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
+1
-4
YHMyNameCardAvatarInfoCell.swift
.../Modules/Community(社区)/V/YHMyNameCardAvatarInfoCell.swift
+23
-13
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHInterestTopicLayout.swift
View file @
f07d7667
...
...
@@ -13,7 +13,7 @@ class YHInterestTopicLayout: UICollectionViewFlowLayout {
var
dataSource
:[
String
]
=
[]
weak
var
layoutDelegate
:
UICollectionViewDelegateFlowLayout
?
=
nil
var
interItemSpacing
:
CGFloat
=
12.0
// 相邻单元格之间的水平间距
let
collectionViewWidth
=
KScreenWidth
-
16.0
*
4
var
collectionViewWidth
=
KScreenWidth
-
16.0
*
4
override
func
prepare
()
{
super
.
prepare
()
self
.
minimumInteritemSpacing
=
12
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
View file @
f07d7667
...
...
@@ -143,18 +143,15 @@ class YHMyInterestTopicCell: UITableViewCell {
layout
.
scrollDirection
=
.
vertical
layout
.
dataSource
=
self
.
topicArr
layout
.
layoutDelegate
=
self
layout
.
collectionViewWidth
=
KScreenWidth
-
16.0
*
4
return
layout
}()
lazy
var
collectionView
:
UICollectionView
=
{
// 创建集合视图布局
// 创建集合视图
let
collectView
=
UICollectionView
(
frame
:
.
zero
,
collectionViewLayout
:
self
.
layout
)
collectView
.
delegate
=
self
collectView
.
dataSource
=
self
collectView
.
backgroundColor
=
.
white
// 注册自定义单元格
collectView
.
register
(
YHTopicItemCell
.
self
,
forCellWithReuseIdentifier
:
YHTopicItemCell
.
cellReuseIdentifier
)
return
collectView
}()
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyNameCardAvatarInfoCell.swift
View file @
f07d7667
...
...
@@ -31,7 +31,8 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
let
cityWidth
=
self
.
getWith
(
font
:
self
.
cityLabel
.
font
,
height
:
20
,
string
:
city
)
self
.
cityLabel
.
frame
=
CGRectMake
(
0
,
0
,
cityWidth
+
8
,
20
)
self
.
zodiacLabel
.
text
=
self
.
userModel
.
zodiac
self
.
signImgV
.
isHidden
=
!
self
.
userModel
.
isSigned
var
name
:
ASAttributedString
=
.
init
(
string
:
self
.
userModel
.
username
,
.
font
(
UIFont
.
PFSC_B
(
ofSize
:
18
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
cityTag
:
ASAttributedString
=
"
\(
.
view
(
self
.
cityLabel
,
.
original
(
.
center
))
)
"
let
zodiacTag
:
ASAttributedString
=
"
\(
.
view
(
self
.
zodiacLabel
,
.
original
(
.
center
))
)
"
...
...
@@ -44,27 +45,38 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
}
self
.
nameTextView
.
attributed
.
text
=
name
var
text1
=
""
if
!
self
.
userModel
.
position
.
isEmpty
{
self
.
professionalLabel
.
text
=
self
.
userModel
.
position
text1
=
self
.
userModel
.
position
}
else
{
self
.
professionalLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
if
self
.
userModel
.
isCurrentUser
{
// 当前用户默认文案
self
.
professionalLabel
.
textColor
=
UIColor
.
mainTextColor30
self
.
professionalLabel
.
text
=
"填写职位 | 填写所属行业"
text1
=
"填写职位 | 填写所属行业"
}
}
self
.
professionalLabel
.
text
=
text1
var
text2
=
""
if
!
self
.
userModel
.
signature
.
isEmpty
{
self
.
detailLabel
.
text
=
self
.
userModel
.
signature
text2
=
self
.
userModel
.
signature
}
else
{
self
.
detailLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
if
self
.
userModel
.
isCurrentUser
{
// 当前用户默认文案
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor30
self
.
detailLabel
.
text
=
"填写个性签名,展现真我风采,彰显独特身份"
text2
=
"填写个性签名,展现真我风采,彰显独特身份"
}
}
self
.
signImgV
.
isHidden
=
!
self
.
userModel
.
isSigned
self
.
detailLabel
.
text
=
text2
var
top2Margin
=
8.0
if
text2
.
isEmpty
{
top2Margin
=
0.0
}
else
{
top2Margin
=
text1
.
isEmpty
?
0.0
:
8.0
}
self
.
detailLabel
.
snp
.
updateConstraints
{
make
in
make
.
top
.
equalTo
(
self
.
professionalLabel
.
snp
.
bottom
)
.
offset
(
top2Margin
)
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
}
...
...
@@ -227,7 +239,6 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
self
.
professionalLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
// make.height.equalTo(20)
make
.
top
.
equalTo
(
self
.
nameTextView
.
snp
.
bottom
)
.
offset
(
0
)
}
...
...
@@ -235,7 +246,6 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
self
.
professionalLabel
.
snp
.
bottom
)
.
offset
(
8
)
// make.height.equalTo(18)
make
.
bottom
.
equalTo
(
-
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