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
9c116077
Commit
9c116077
authored
May 22, 2025
by
yqz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui优化
parent
1d514222
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
35 deletions
+42
-35
HomeViewController.swift
...nager/Class/Page/Home/Controller/HomeViewController.swift
+7
-9
HomeTabbarItem.swift
PhoneManager/Class/Page/Home/Model/HomeTabbarItem.swift
+8
-0
TabbarImtesData.json
PhoneManager/Class/Page/Home/Model/TabbarImtesData.json
+12
-12
HomeTabbarView.swift
PhoneManager/Class/Page/Home/View/HomeTabbarView.swift
+12
-11
HomeView.swift
PhoneManager/Class/Page/Home/View/HomeView.swift
+2
-2
HomeTitleCollectionCell.swift
...r/Class/Page/Home/View/cell/HomeTitleCollectionCell.swift
+1
-1
No files found.
PhoneManager/Class/Page/Home/Controller/HomeViewController.swift
View file @
9c116077
...
...
@@ -20,10 +20,9 @@ class HomeViewController:BaseViewController {
fileprivate
func
junmToModule
(
_
cIndex
:
Int
,
_
self
:
HomeViewController
)
{
fileprivate
func
junmToModule
(
_
cIndex
:
String
,
_
self
:
HomeViewController
)
{
switch
cIndex
{
case
0
:
case
HomeTabbarItemState
.
Charging
.
rawValue
:
DispatchQueue
.
main
.
async
{[
weak
self
]
in
...
...
@@ -34,7 +33,7 @@ class HomeViewController:BaseViewController {
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
break
case
1
:
case
HomeTabbarItemState
.
SecretSpace
.
rawValue
:
DispatchQueue
.
main
.
async
{
[
weak
self
]
in
guard
let
self
else
{
return
}
...
...
@@ -56,14 +55,14 @@ class HomeViewController:BaseViewController {
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
case
2
:
case
HomeTabbarItemState
.
Contacts
.
rawValue
:
DispatchQueue
.
main
.
async
{[
weak
self
]
in
guard
let
self
else
{
return
}
let
vc
:
ContactViewController
=
ContactViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
break
case
3
:
case
HomeTabbarItemState
.
EmailCleaner
.
rawValue
:
DispatchQueue
.
main
.
async
{[
weak
self
]
in
guard
let
self
else
{
return
}
if
PMEmailManager
.
shareManager
.
loginUser
!=
nil
{
...
...
@@ -75,7 +74,7 @@ class HomeViewController:BaseViewController {
}
}
break
case
4
:
case
HomeTabbarItemState
.
Compress
.
rawValue
:
DispatchQueue
.
main
.
async
{[
weak
self
]
in
guard
let
self
else
{
return
}
let
vc
:
CompressController
=
CompressController
()
...
...
@@ -178,8 +177,7 @@ class HomeViewController:BaseViewController {
guard
let
self
else
{
return
}
if
let
cIndex
=
index
as?
Int
{
if
let
cIndex
=
index
as?
String
{
// 先走广告策略
if
AdvManager
.
shared
.
advTimeAfterInAPP
<=
0
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
...
...
PhoneManager/Class/Page/Home/Model/HomeTabbarItem.swift
View file @
9c116077
...
...
@@ -28,6 +28,14 @@ func loadTabbarImtesSONFromBundle() -> [HomeTabbarItem]? {
}
}
enum
HomeTabbarItemState
:
String
{
case
Charging
=
"Charging"
case
SecretSpace
=
"Secret Space"
case
Contacts
=
"Contacts"
case
EmailCleaner
=
"Email Cleaner"
case
Compress
=
"Compress"
}
struct
HomeTabbarItem
:
Codable
{
var
normalImage
:
String
...
...
PhoneManager/Class/Page/Home/Model/TabbarImtesData.json
View file @
9c116077
[
{
"normalImage"
:
"ic_charging_home_pre"
,
"heightImage"
:
"tabbar_Charging_high"
,
"text"
:
"Charging"
,
},
{
"normalImage"
:
"ic_secret_home_pre"
,
"heightImage"
:
"tabbar_secret_hight"
,
"text"
:
"Secret Space"
,
},
{
"normalImage"
:
"ic_contacts_home_pre"
,
"heightImage"
:
"tabbar_contacts_hight"
,
"text"
:
"Contacts"
,
"normalImage"
:
"ic_charging_home_pre"
,
"heightImage"
:
"tabbar_Charging_high"
,
"text"
:
"Charging"
,
},
{
"normalImage"
:
"ic_cmpress_home_pre"
,
"heightImage"
:
"tabbar_cmpress_high"
,
"text"
:
"Compress"
,
},
{
"normalImage"
:
"ic_email_home_pre"
,
...
...
@@ -20,8 +20,8 @@
"text"
:
"Email Cleaner"
,
},
{
"normalImage"
:
"ic_c
mpres
s_home_pre"
,
"heightImage"
:
"tabbar_c
mpress_high
"
,
"text"
:
"Co
mpres
s"
,
}
"normalImage"
:
"ic_c
ontact
s_home_pre"
,
"heightImage"
:
"tabbar_c
ontacts_hight
"
,
"text"
:
"Co
ntact
s"
,
}
,
]
PhoneManager/Class/Page/Home/View/HomeTabbarView.swift
View file @
9c116077
...
...
@@ -36,7 +36,7 @@ class HomeTabbarView:UIView {
private
func
addButton
()
{
let
cW
:
CGFloat
=
(
self
.
width
-
16
)
/
Double
(
tabbarItems
.
count
)
let
cW
:
CGFloat
=
(
self
.
width
-
32
)
/
Double
(
tabbarItems
.
count
)
let
cH
:
CGFloat
=
54
for
(
index
,
item
)
in
tabbarItems
.
enumerated
()
{
...
...
@@ -49,11 +49,11 @@ class HomeTabbarView:UIView {
btn
.
setTitle
(
item
.
text
,
for
:
.
normal
)
btn
.
addTarget
(
self
,
action
:
#selector(
tabbarClick(_:)
)
,
for
:
.
touchUpInside
)
btn
.
width
=
cW
btn
.
tag
=
10
+
index
btn
.
height
=
cH
btn
.
y
=
safeHeight
==
0
?
6
:
12
btn
.
x
=
8
+
Double
(
index
)
*
cW
btn
.
x
=
16
+
Double
(
index
)
*
cW
btn
.
changBtnWithStytl
(
btnStyle
:
.
imageTop
,
margin
:
5
)
self
.
addSubview
(
btn
)
}
}
...
...
@@ -65,14 +65,15 @@ class HomeTabbarView:UIView {
}
@objc
func
tabbarClick
(
_
btn
:
UIButton
)
{
let
btnText
=
btn
.
titleLabel
?
.
text
for
(
index
,
item
)
in
tabbarItems
.
enumerated
()
{
if
item
.
text
==
btnText
{
indexCallBack
(
index
)
}
}
let
tm
=
tabbarItems
[
btn
.
tag
%
10
]
indexCallBack
(
tm
.
text
)
// let btnText = btn.titleLabel?.text
//
// for (index, item) in tabbarItems.enumerated() {
// if item.text == btnText {
// indexCallBack(index)
// }
// }
}
...
...
PhoneManager/Class/Page/Home/View/HomeView.swift
View file @
9c116077
...
...
@@ -130,14 +130,14 @@ class HomeView:UIView {
backgroundColor
=
.
clear
clipsToBounds
=
true
homeTabbarView
=
HomeTabbarView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
self
.
width
,
height
:
safeHeight
+
66
))
homeTabbarView
=
HomeTabbarView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
self
.
width
,
height
:
safeHeight
+
80
))
self
.
addSubview
(
homeTabbarView
!
)
homeTabbarView
?
.
snp
.
makeConstraints
({
make
in
make
.
bottom
.
centerX
.
width
.
equalToSuperview
()
make
.
height
.
equalTo
(
safeHeight
+
66
)
make
.
height
.
equalTo
(
safeHeight
+
80
)
})
homeTabbarView
?
.
indexCallBack
=
{[
weak
self
]
index
in
...
...
PhoneManager/Class/Page/Home/View/cell/HomeTitleCollectionCell.swift
View file @
9c116077
...
...
@@ -48,7 +48,7 @@ class HomeTitleCollectionCell:UICollectionViewCell {
titleLabel
=
UILabel
()
titleLabel
.
font
=
UIFont
.
systemFont
(
ofSize
:
1
6
,
weight
:
.
bold
)
titleLabel
.
font
=
UIFont
.
systemFont
(
ofSize
:
1
8
,
weight
:
.
bold
)
titleLabel
.
textColor
=
UIColor
.
colorWithHex
(
hexStr
:
black3Color
)
fileLabel
=
UILabel
()
...
...
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