Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
iOSTeam
/
Majiabao
/
TealiveModule
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f01a4061
authored
Jul 25, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed 如果超过6个tab的话。会跳转不了的问题
parent
106fae0d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
LocalPodSpec/GDToolBox/GDToolBox/Classes/Tool/UI/UIViewController+Extend.swift
Module/GDTabbar/GDTabbar/Feature/Model/GDTabBarModel.swift
LocalPodSpec/GDToolBox/GDToolBox/Classes/Tool/UI/UIViewController+Extend.swift
View file @
f01a4061
...
...
@@ -15,6 +15,8 @@ public extension UIViewController {
let
navVC
=
vc
as!
UINavigationController
if
let
visibleVC
=
navVC
.
visibleViewController
{
return
self
.
getVisibleViewController
(
from
:
visibleVC
)
}
else
if
let
selectedVC
=
navVC
.
tabBarController
?
.
selectedViewController
{
return
navVC
.
tabBarController
?
.
selectedViewController
}
else
{
return
nil
}
...
...
Module/GDTabbar/GDTabbar/Feature/Model/GDTabBarModel.swift
View file @
f01a4061
...
...
@@ -57,15 +57,16 @@ class GDTabBarModel {
case
.
me
:
// 构建导航控制器
if
let
myPage
=
GDRouter
.
MyModule
?
.
showMyPageVC
()
{
let
navVC
=
BaseNavigationController
()
navVC
.
modalPresentationStyle
=
.
overFullScreen
navVC
.
addChild
(
myPage
)
//TODO:tabbar如果没有传nav Controller进去的话。: added By Pidan
// let navVC = BaseNavigationController()
// navVC.modalPresentationStyle = .overFullScreen
// navVC.addChild(myPage)
return
GDTabBarModel
(
type
:
type
,
title
:
"我的"
,
normalImage
:
GDTabbarBundle
.
imageNamed
(
"tabbar_my_normal"
)
??
UIImage
(),
selectImage
:
GDTabbarBundle
.
imageNamed
(
"tabbar_my_selected"
)
??
UIImage
(),
animateImages
:
nil
,
controller
:
navVC
)
controller
:
myPage
)
}
case
.
message
:
if
let
messageVC
=
GDRouter
.
ChatRoom
?
.
showMessageListVC
()
{
...
...
@@ -83,29 +84,29 @@ class GDTabBarModel {
case
.
friend
:
// 构建导航控制器
if
let
friendVC
=
GDRouter
.
Friend
?
.
friendListVC
()
{
let
navVC
=
BaseNavigationController
()
navVC
.
modalPresentationStyle
=
.
overFullScreen
navVC
.
addChild
(
friendVC
)
//
let navVC = BaseNavigationController()
//
navVC.modalPresentationStyle = .overFullScreen
//
navVC.addChild(friendVC)
return
GDTabBarModel
(
type
:
type
,
title
:
"好友"
,
normalImage
:
GDTabbarBundle
.
imageNamed
(
"tabbar_friends_normal"
)
??
UIImage
(),
selectImage
:
GDTabbarBundle
.
imageNamed
(
"tabbar_friends_selected"
)
??
UIImage
(),
animateImages
:
nil
,
controller
:
nav
VC
)
controller
:
friend
VC
)
}
break
case
.
showRoomList
:
// 构建导航控制器
if
let
friend
VC
=
GDRouter
.
RoomListRouter
?
.
showRoomListVC
()
{
let
navVC
=
BaseNavigationController
()
navVC
.
modalPresentationStyle
=
.
overFullScreen
navVC
.
addChild
(
friendVC
)
if
let
roomList
VC
=
GDRouter
.
RoomListRouter
?
.
showRoomListVC
()
{
//
let navVC = BaseNavigationController()
//
navVC.modalPresentationStyle = .overFullScreen
//
navVC.addChild(friendVC)
return
GDTabBarModel
(
type
:
type
,
title
:
"直播"
,
normalImage
:
GDTabbarBundle
.
imageNamed
(
"tabbar_roomlist_normal"
)
??
UIImage
(),
selectImage
:
GDTabbarBundle
.
imageNamed
(
"tabbar_roomlist_selected"
)
??
UIImage
(),
animateImages
:
nil
,
controller
:
nav
VC
)
controller
:
roomList
VC
)
}
break
case
.
prize
:
...
...
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