I have view with news in tableView, when I change some parameters in settings and return to view with news, my tableView must reloads news depending on new settings. I have outlet activityIndicator and this code :
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
// Start animating
indicator.startAnimating()
indicator.backgroundColor = UIColor.white
// Load new depending on settings
getJsonFromUrl(editionsArray: GlobalSettings.sharedManager.editions.sorted())
self.tableView.reloadData()
indicator.stopAnimating()
indicator.hidesWhenStopped = true
}
Now when tableView is empty I can see activityIndicator, but when my tableView reloads, activityIndicator is not shown on screen.