Browse Source

Tab bar hidden

pull/1/head
Dibya Malla 4 years ago
parent
commit
3741027572
  1. 24
      GME Remit/Modules/Home/User Interface/Wireframe/HomeWireframe.swift
  2. 3
      GME Remit/Modules/LauncherScreen/User Interface/Wireframe/LauncherScreenWireframe.swift
  3. 3
      GME Remit/Modules/Login/User Interface/Wireframe/LoginWireframe.swift
  4. 12
      GME Remit/Modules/Main/User Interface/View/MainViewController.swift
  5. 3
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/Wireframe/NewRegisterWireframe.swift
  6. 3
      GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistoryGroup/User Interface/Wireframe/TransactionHistoryGroupWireframe.swift
  7. 20
      GME Remit/Protocols/WireframeInput.swift

24
GME Remit/Modules/Home/User Interface/Wireframe/HomeWireframe.swift

@ -46,39 +46,27 @@ extension HomeWireframe: HomeWireframeInput {
}
func openSendMoney() {
if let navigation = self.view.navigationController {
self.sendMoneyWireframe.pushMainView(in: navigation)
}
self.sendMoneyWireframe.pushMainView(on: self.view)
}
func openNotice() {
if let navigation = self.view.navigationController {
self.noticeWireframe.pushMainView(in: navigation)
}
self.noticeWireframe.pushMainView(on: self.view)
}
func openTrackYourTransfer() {
if let navigation = self.view.navigationController {
self.walletStatementWireframe.openWalletStatement(source: navigation)
}
self.walletStatementWireframe.pushMainView(on: self.view)
}
func openTodaysRate() {
if let navigation = self.view.navigationController {
self.todaysRateWireframe.pushMainView(in: navigation)
}
self.todaysRateWireframe.pushMainView(on: self.view)
}
func openRedeemCashPayment(){
if let navigation = self.view.navigationController {
RedeemCashPickUpWireframe().pushMainView(in: navigation)
}
RedeemCashPickUpWireframe().pushMainView(on: self.view)
}
func openWithdraw(){
if let navigation = self.view.navigationController {
WithdrawFromWalletWireframe().pushMainView(in: navigation)
}
WithdrawFromWalletWireframe().pushMainView(on: self.view)
}
func openAgreement() {

3
GME Remit/Modules/LauncherScreen/User Interface/Wireframe/LauncherScreenWireframe.swift

@ -129,9 +129,10 @@ extension LauncherScreenWireframe {
) as? SideMenuViewController else {
return
}
let navWithTab = UINavigationController(rootViewController: tabBarViewController!)
let sideMenuController = LGSideMenuController(
rootViewController: tabBarViewController,
rootViewController: navWithTab,
leftViewController: sidemenuVc,
rightViewController: nil
)

3
GME Remit/Modules/Login/User Interface/Wireframe/LoginWireframe.swift

@ -48,8 +48,9 @@ extension LoginWireframe: LoginWireframeInput {
let mainWireFrame = MainWireframe.shared
let tabBarViewController = mainWireFrame?.getMainView()
let navWithTab = UINavigationController(rootViewController: tabBarViewController!)
let sideMenuController = LGSideMenuController(
rootViewController: tabBarViewController,
rootViewController: navWithTab,
leftViewController: sidemenuVc,
rightViewController: nil
)

12
GME Remit/Modules/Main/User Interface/View/MainViewController.swift

@ -29,6 +29,16 @@ class MainViewController: UITabBarController {
self.setupAppearance()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(false, animated: animated)
}
func setup(viewControllers: [UIViewController]) {
self.viewControllers = viewControllers
self.setupTab()
@ -45,7 +55,7 @@ class MainViewController: UITabBarController {
self.tabBar.isTranslucent = false
self.tabBar.shadowImage = Colors.TabBar.shadow.image()
self.tabBar.backgroundImage = UIImage()
// self.tabBar.barTintColor = .themeMainBackground
// self.tabBar.barTintColor = .themeMainBackground
}
override func setupTabItem() {

3
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/Wireframe/NewRegisterWireframe.swift

@ -160,6 +160,7 @@ extension NewRegisterWireframe: NewRegisterWireframeInput {
let mainWireFrame = MainWireframe.shared
let tabBarViewController = mainWireFrame?.getMainView()
let navWithTab = UINavigationController(rootViewController: tabBarViewController!)
guard let sidemenuVc = UIStoryboard(name: "SideMenu", bundle: nil).instantiateViewController(
withIdentifier: "SideMenuViewController"
) as? SideMenuViewController else {
@ -167,7 +168,7 @@ extension NewRegisterWireframe: NewRegisterWireframeInput {
}
let sideMenuController = LGSideMenuController(
rootViewController: tabBarViewController,
rootViewController: navWithTab,
leftViewController: sidemenuVc,
rightViewController: nil
)

3
GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistoryGroup/User Interface/Wireframe/TransactionHistoryGroupWireframe.swift

@ -43,8 +43,7 @@ extension TransactionHistoryGroupWireframe: TransactionHistoryGroupWireframeInpu
func push(overseasType: OverseasType = .outbound, in source: UINavigationController) {
self.overseasType = overseasType
let mainView = self.getMainView()
source.pushViewController(mainView, animated: true)
self.pushMainView(in: source)
}
func open(overseasType: OverseasType = .outbound, on source: UIViewController?) {

20
GME Remit/Protocols/WireframeInput.swift

@ -49,12 +49,12 @@ extension WireframeInput {
func pushMainView(on source: UIViewController) {
let mainView = self.getMainView()
source.navigationController?.pushViewController(mainView, animated: true)
source.push(mainView, animated: true)
}
func pushMainView(in source: UINavigationController) {
let mainView = self.getMainView()
source.pushViewController(mainView, animated: true)
source.push(mainView, animated: true)
}
func openViewControllerWithNavigation(viewController: UIViewController, source: UIViewController) {
@ -64,3 +64,19 @@ extension WireframeInput {
}
}
extension UIViewController{
func push(_ viewController: UIViewController, animated: Bool){
if let tabBarController = self.tabBarController{
tabBarController.navigationController?.pushViewController(viewController, animated: animated)
return
}
if let navigationController = self.navigationController{
navigationController.pushViewController(viewController, animated: animated)
return
}
if let navigation = self as? UINavigationController{
navigation.pushViewController(viewController, animated: animated)
}
}
}
Loading…
Cancel
Save