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
0331ebf1
Commit
0331ebf1
authored
Jun 17, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 未读消息
parent
1c1a0a85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
YHMessageBellView.swift
...galaxy/Classes/Modules/Home(首页)/V/YHMessageBellView.swift
+8
-3
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHMessageBellView.swift
View file @
0331ebf1
...
...
@@ -16,7 +16,12 @@ class YHMessageBellView: UIView {
var
unreadCount
:
Int
=
0
{
didSet
{
self
.
unreadLabel
.
isHidden
=
(
self
.
unreadCount
<=
0
)
var
width
=
18.0
if
0
<
self
.
unreadCount
&&
self
.
unreadCount
<
100
{
self
.
unreadLabel
.
text
=
"
\(
self
.
unreadCount
)
"
}
else
if
self
.
unreadCount
>=
100
{
self
.
unreadLabel
.
text
=
"99+"
}
var
width
=
16.0
if
10
<=
self
.
unreadCount
&&
self
.
unreadCount
<
100
{
width
=
22.0
}
else
if
self
.
unreadCount
>=
100
{
...
...
@@ -72,8 +77,8 @@ class YHMessageBellView: UIView {
self
.
unreadLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
self
.
bellImgV
)
.
offset
(
10
)
make
.
bottom
.
equalTo
(
self
.
bellImgV
.
snp
.
top
)
.
offset
(
8.0
)
make
.
height
.
equalTo
(
1
8
.0
)
make
.
width
.
equalTo
(
1
8
.0
)
make
.
height
.
equalTo
(
1
6
.0
)
make
.
width
.
equalTo
(
1
6
.0
)
}
}
...
...
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