Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PhoneManager
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yang
PhoneManager
Commits
7efda812
Commit
7efda812
authored
May 23, 2025
by
yqz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
0b8a4cce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
HomePhotosDetailCollectionCell.swift
.../Page/Home/View/cell/HomePhotosDetailCollectionCell.swift
+5
-5
HomeVideoDetailCell.swift
...nager/Class/Page/Home/View/cell/HomeVideoDetailCell.swift
+5
-5
No files found.
PhoneManager/Class/Page/Home/View/cell/HomePhotosDetailCollectionCell.swift
View file @
7efda812
...
...
@@ -31,11 +31,11 @@ class HomePhotosDetailCollectionCell : UICollectionViewCell {
didSet
{
let
sizeKB
:
Double
=
Double
((
resourceIdent
?
.
assetSize
??
0
)
/
1000
)
if
sizeKB
<
1000
{
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2f
KB"
,
sizeKB
)
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2fKB"
,
sizeKB
)
}
else
if
sizeKB
<
(
1000
*
1000
)
&&
sizeKB
>
1000
{
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2f
MB"
,
sizeKB
/
1000
)
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2fMB"
,
sizeKB
/
1000
)
}
else
{
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2f
GB"
,
sizeKB
/
(
1000
*
1000
))
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2fGB"
,
sizeKB
/
(
1000
*
1000
))
}
}
}
...
...
@@ -146,7 +146,6 @@ class HomePhotosDetailCollectionCell : UICollectionViewCell {
self
.
saveSizeView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
top
.
equalToSuperview
()
.
offset
(
6
)
make
.
height
.
equalTo
(
24
)
make
.
width
.
equalTo
(
100
)
}
self
.
saveSizeLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
11
)
...
...
@@ -155,9 +154,10 @@ class HomePhotosDetailCollectionCell : UICollectionViewCell {
}
self
.
moreImageView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
10
)
make
.
left
.
equalTo
(
saveSizeLabel
.
snp
.
right
)
.
offset
(
4
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
width
.
equalTo
(
16
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
11
)
}
}
...
...
PhoneManager/Class/Page/Home/View/cell/HomeVideoDetailCell.swift
View file @
7efda812
...
...
@@ -27,11 +27,11 @@ class HomeVideoDetailCell : UICollectionViewCell {
let
sizeKB
:
Double
=
Double
(
model
.
assetSize
/
1000
)
if
sizeKB
<
1000
{
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2f
KB"
,
sizeKB
)
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2fKB"
,
sizeKB
)
}
else
if
sizeKB
<
(
1000
*
1000
)
&&
sizeKB
>
1000
{
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2f
MB"
,
sizeKB
/
1000
)
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2fMB"
,
sizeKB
/
1000
)
}
else
{
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2f
GB"
,
sizeKB
/
(
1000
*
1000
))
self
.
saveSizeLabel
.
text
=
String
(
format
:
"%.2fGB"
,
sizeKB
/
(
1000
*
1000
))
}
...
...
@@ -201,7 +201,6 @@ class HomeVideoDetailCell : UICollectionViewCell {
self
.
saveSizeView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
top
.
equalToSuperview
()
.
offset
(
6
)
make
.
height
.
equalTo
(
24
)
make
.
width
.
equalTo
(
100
)
}
self
.
saveSizeLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
11
)
...
...
@@ -210,9 +209,10 @@ class HomeVideoDetailCell : UICollectionViewCell {
}
self
.
moreImageView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
10
)
make
.
left
.
equalTo
(
saveSizeLabel
.
snp
.
right
)
.
offset
(
4
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
width
.
equalTo
(
16
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
11
)
}
self
.
selectImageView
.
snp
.
makeConstraints
{
make
in
...
...
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