From 801323cf1b38ffe6c0b75b6bf3809d43761a9176 Mon Sep 17 00:00:00 2001 From: seu11ee Date: Sun, 29 Nov 2020 15:42:56 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EB=A9=94=EC=9D=B8=EB=B7=B0=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=EB=82=B4=EB=B9=84=20=EC=A7=84=EC=9E=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mongle/Mongle/Source/VCs/MainTabMainVC.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Mongle/Mongle/Source/VCs/MainTabMainVC.swift b/Mongle/Mongle/Source/VCs/MainTabMainVC.swift index 35ca372..2997d6e 100644 --- a/Mongle/Mongle/Source/VCs/MainTabMainVC.swift +++ b/Mongle/Mongle/Source/VCs/MainTabMainVC.swift @@ -220,9 +220,11 @@ class MainTabMainVC: UIViewController { // MARK:- IBAction Method @IBAction func searchButton(_ sender: Any) { if let tabBar = self.tabBarController as? UnderTabBarController { - if let searchVC = tabBar.viewControllers![1] as? SearchTabMainVC { - searchVC.prevIdx = 0 - tabBar.selectedIndex = 1 + if let searchNavi = tabBar.viewControllers![1] as? UINavigationController { + if let searchVC = searchNavi.viewControllers[0] as? SearchTabMainVC{ + searchVC.prevIdx = 0 + tabBar.selectedIndex = 1 + } } } }