Skip to content

Commit

Permalink
[#112] FIX : 이벤트 저장시 CollectionView reload
Browse files Browse the repository at this point in the history
  • Loading branch information
ffalswo2 committed Jul 21, 2022
1 parent e14c2c6 commit c6848f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ final class HomeViewController: UIViewController {
configUI()
render()
setCollectionView()
setNotificationCenter()
}

override func viewWillAppear(_ animated: Bool) {
Expand All @@ -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)
}
Expand Down Expand Up @@ -375,3 +380,9 @@ extension HomeViewController {
}
}
}

extension HomeViewController {
@objc private func reloadEventCollectionView() {
self.homeCollectionView.reloadData()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit c6848f0

Please sign in to comment.