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
3e734b05
Commit
3e734b05
authored
Jan 04, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码 优化
parent
f2bf4535
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
YHTabBarViewController.swift
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
+7
-16
No files found.
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
View file @
3e734b05
...
...
@@ -20,9 +20,6 @@ class YHTabBarViewController: ESTabBarController {
// NotificationCenter.default.addObserver(self, selector: #selector(hideTabBar), name: BsConstant.BsNotification.tabBarHideNotification, object: nil)
//
// NotificationCenter.default.addObserver(self, selector: #selector(showTabBar), name: BsConstant.BsNotification.tabBarShowNotification, object: nil)
}
}
...
...
@@ -37,28 +34,22 @@ extension YHTabBarViewController {
}
extension
YHTabBarViewController
{
//
//展示tabbar上的横线
func
handleTabBarLine
()
->
Void
{
let
rect
=
CGRect
.
init
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
1
)
UIGraphicsBeginImageContext
(
rect
.
size
)
let
context
=
UIGraphicsGetCurrentContext
()
let
fillColor
=
YHColorWithHex
(
0xeeeeee
)
context
!.
setFillColor
(
fillColor
.
cgColor
)
context
!.
fill
(
rect
)
let
img
=
UIGraphicsGetImageFromCurrentImageContext
()
UIGraphicsEndImageContext
()
let
rect
=
CGRect
.
init
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
0.5
)
let
fillColor
=
YHColorWithHex
(
0x888888
)
let
img
=
UIImage
.
from
(
color
:
fillColor
,
rect
:
rect
)
UIView
.
transition
(
with
:
self
.
tabBar
,
duration
:
0.5
,
options
:
.
transitionCrossDissolve
)
{
if
#available(iOS 13.0, *)
{
let
appearance
=
self
.
tabBar
.
standardAppearance
.
copy
()
appearance
.
backgroundImage
=
UIImage
.
init
()
appearance
.
backgroundImage
=
UIImage
()
appearance
.
shadowImage
=
img
self
.
tabBar
.
standardAppearance
=
appearance
}
else
{
self
.
tabBar
.
backgroundImage
=
UIImage
.
init
()
self
.
tabBar
.
backgroundImage
=
UIImage
()
self
.
tabBar
.
shadowImage
=
img
}
}
completion
:
{
Bool
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