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
1dfb8bfa
Commit
1dfb8bfa
authored
Apr 16, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 消息
parent
54a8f2fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
14 deletions
+5
-14
YHTabBarViewController.swift
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
+0
-13
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+5
-1
No files found.
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
View file @
1dfb8bfa
...
@@ -20,7 +20,6 @@ class YHTabBarViewController: ESTabBarController {
...
@@ -20,7 +20,6 @@ class YHTabBarViewController: ESTabBarController {
super
.
viewDidLoad
()
super
.
viewDidLoad
()
handleTabBarLine
()
handleTabBarLine
()
addObservers
()
addObservers
()
self
.
delegate
=
self
}
}
func
addObservers
()
{
func
addObservers
()
{
...
@@ -103,15 +102,3 @@ extension YHTabBarViewController {
...
@@ -103,15 +102,3 @@ extension YHTabBarViewController {
}
}
}
}
}
}
extension
YHTabBarViewController
:
UITabBarControllerDelegate
{
func
tabBarController
(
_
tabBarController
:
UITabBarController
,
didSelect
viewController
:
UIViewController
)
{
if
let
vcs
=
self
.
viewControllers
,
let
msgVC
=
vcs
[
safe
:
2
],
viewController
==
msgVC
{
// 点击消息tab 清空应用icon未读数
UIApplication
.
shared
.
applicationIconBadgeNumber
=
8
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
1dfb8bfa
...
@@ -212,13 +212,17 @@ extension YHHomePageViewController : UITabBarControllerDelegate {
...
@@ -212,13 +212,17 @@ extension YHHomePageViewController : UITabBarControllerDelegate {
}
}
}
}
self
.
tapTimestamp
=
timestamp
self
.
tapTimestamp
=
timestamp
}
else
if
tabBarController
.
selectedIndex
==
2
{
// 点击消息tab 清空应用icon未读数
UIApplication
.
shared
.
applicationIconBadgeNumber
=
0
}
}
}
}
func
tabBarController
(
_
tabBarController
:
UITabBarController
,
shouldSelect
viewController
:
UIViewController
)
->
Bool
{
func
tabBarController
(
_
tabBarController
:
UITabBarController
,
shouldSelect
viewController
:
UIViewController
)
->
Bool
{
let
index
=
tabBarController
.
viewControllers
?
.
firstIndex
(
of
:
viewController
)
let
index
=
tabBarController
.
viewControllers
?
.
firstIndex
(
of
:
viewController
)
if
index
==
1
{
if
index
==
1
||
index
==
2
{
if
YHLoginManager
.
shared
.
isLogin
()
{
if
YHLoginManager
.
shared
.
isLogin
()
{
return
true
return
true
}
else
{
}
else
{
...
...
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