diff --git a/Hous-iOS/Hous-iOS/Screens/Home/ViewController/HomeViewController.swift b/Hous-iOS/Hous-iOS/Screens/Home/ViewController/HomeViewController.swift index e0a8f75..ddbe0f3 100644 --- a/Hous-iOS/Hous-iOS/Screens/Home/ViewController/HomeViewController.swift +++ b/Hous-iOS/Hous-iOS/Screens/Home/ViewController/HomeViewController.swift @@ -53,6 +53,7 @@ final class HomeViewController: UIViewController { configUI() render() setCollectionView() + setNotificationCenter() } override func viewWillAppear(_ animated: Bool) { @@ -64,6 +65,10 @@ final class HomeViewController: UIViewController { //MARK: Custom Methods + private func setNotificationCenter() { + NotificationCenter.default.addObserver(self, selector: #selector(reloadEventCollectionView), name: NSNotification.Name("DismissPopUp"), object: nil) + } + private func showNavigation() { isNavigatinHidden(isHidden: false) } @@ -375,3 +380,9 @@ extension HomeViewController { } } } + +extension HomeViewController { + @objc private func reloadEventCollectionView() { + self.homeCollectionView.reloadData() + } +} diff --git a/Hous-iOS/Hous-iOS/Screens/Home/ViewController/PopUpViewController.swift b/Hous-iOS/Hous-iOS/Screens/Home/ViewController/PopUpViewController.swift index c26c893..e53ed0a 100644 --- a/Hous-iOS/Hous-iOS/Screens/Home/ViewController/PopUpViewController.swift +++ b/Hous-iOS/Hous-iOS/Screens/Home/ViewController/PopUpViewController.swift @@ -387,6 +387,7 @@ extension PopUpViewController { updateEventDetail(eventName: eventName, eventIcon: eventIcon, eventId: eventId, date: date, participants: participants) } + NotificationCenter.default.post(name: NSNotification.Name("DismissPopUp"), object: nil) self.dismiss(animated: true) } }