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
43b21730
Commit
43b21730
authored
Jun 26, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的名片
parent
39406479
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
YHMyEducationCell.swift
...y/Classes/Modules/Community(社区)/V/YHMyEducationCell.swift
+14
-7
YHMyInterestTopicCell.swift
...asses/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyEducationCell.swift
View file @
43b21730
...
...
@@ -19,7 +19,6 @@ class YHMyEducationCell: UITableViewCell {
self
.
editBtn
.
isHidden
=
!
self
.
userModel
.
isCurrentUser
self
.
collegeLabel
.
textColor
=
UIColor
.
mainTextColor
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor70
if
!
self
.
userModel
.
college
.
isEmpty
{
self
.
collegeLabel
.
text
=
self
.
userModel
.
college
}
else
{
...
...
@@ -30,14 +29,26 @@ class YHMyEducationCell: UITableViewCell {
}
}
var
detail
=
self
.
userModel
.
major
var
isFirst
=
true
if
!
detail
.
isEmpty
{
isFirst
=
false
}
if
!
self
.
userModel
.
background
.
isEmpty
{
self
.
detailLabel
.
text
=
self
.
userModel
.
background
if
isFirst
{
detail
+=
self
.
userModel
.
background
}
else
{
detail
+=
"·"
+
self
.
userModel
.
background
}
}
if
!
detail
.
isEmpty
{
self
.
detailLabel
.
text
=
detail
}
else
{
self
.
detailLabel
.
text
=
""
if
self
.
userModel
.
isCurrentUser
{
self
.
detailLabel
.
text
=
"填写专业 · 填写学位"
self
.
detailLabel
.
textColor
=
UIColor
.
mainTextColor30
}
}
...
...
@@ -127,9 +138,6 @@ class YHMyEducationCell: UITableViewCell {
self
.
backgroundColor
=
.
clear
self
.
contentView
.
backgroundColor
=
.
clear
collegeLabel
.
text
=
"上海交通大学xxxx学院"
detailLabel
.
text
=
"宗教学宗教学宗教学宗教学 · 本科"
self
.
contentView
.
addSubview
(
self
.
cardView
)
cardView
.
addSubview
(
self
.
titleLabel
)
cardView
.
addSubview
(
self
.
collegeLabel
)
...
...
@@ -165,7 +173,6 @@ class YHMyEducationCell: UITableViewCell {
make
.
top
.
equalTo
(
self
.
titleLabel
.
snp
.
bottom
)
.
offset
(
12
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
height
.
greaterThanOrEqualTo
(
20
)
}
detailLabel
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHMyInterestTopicCell.swift
View file @
43b21730
...
...
@@ -254,7 +254,7 @@ extension YHMyInterestTopicCell: UICollectionViewDelegate, UICollectionViewDataS
func
getwith
(
font
:
UIFont
,
height
:
CGFloat
,
string
:
String
)
->
CGSize
{
let
size
=
CGSize
.
init
(
width
:
CGFloat
(
MAXFLOAT
),
height
:
height
)
let
dic
=
[
NSAttributedString
.
Key
.
font
:
font
]
// swift 4.2
var
strSize
=
string
.
boundingRect
(
with
:
size
,
options
:
[
.
usesLineFragmentOrigin
],
attributes
:
dic
,
context
:
nil
)
.
size
let
strSize
=
string
.
boundingRect
(
with
:
size
,
options
:
[
.
usesLineFragmentOrigin
],
attributes
:
dic
,
context
:
nil
)
.
size
return
CGSizeMake
(
ceil
(
strSize
.
width
),
strSize
.
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