From 489b744876289686959680520fde96bd1a9e1b9d Mon Sep 17 00:00:00 2001 From: Anton Sergeev Date: Sat, 15 Sep 2018 20:41:37 +0300 Subject: [PATCH] Postpone fetchEvents for main view after view appearing --- .../ViewControllers/Feed/Main/MainViewController.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHMeetupApp/Sources/ViewControllers/Feed/Main/MainViewController.swift b/CHMeetupApp/Sources/ViewControllers/Feed/Main/MainViewController.swift index 43ad396f..f0bd3476 100644 --- a/CHMeetupApp/Sources/ViewControllers/Feed/Main/MainViewController.swift +++ b/CHMeetupApp/Sources/ViewControllers/Feed/Main/MainViewController.swift @@ -38,10 +38,14 @@ class MainViewController: UIViewController, DisplayCollectionWithTableViewDelega super.viewWillAppear(animated) self.tableView.reloadData() - fetchEvents() profileNavigationController?.pushEditProfileTo(self.navigationController) } + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + fetchEvents() + } + override func az_tabBarItemContentView() -> AZTabBarItemView { return TabBarItemView.create(with: .main) }