         }
         return nil
     }
-    
+
     func setUpActivityIndicator() {
         activityIndicator = UIActivityIndicatorView(style: UIActivityIndicatorView.Style.gray)
         if let activityIndicator = activityIndicator {


    @objc func reachabilityChanged(_ notification: Notification) {
        if let reachability = notification.object as? Reachability {
            
            // Dismiss current banner, if any
            banner?.dismiss()
            banner = nil
            // Dismiss current activity indicator, if any
            activityIndicator?.stopAnimating()
            activityIndicator = nil
            
            switch reachability.connection {
            case .none:
                banner = StatusBarNotificationBanner(title: Constants.Banner.noInternetConnection, style: .danger)

            }
        }
    }

    func emptyDataSet(_ scrollView: UIScrollView!, didTap didTapButton: UIButton!) {
        setUpActivityIndicator()
        if let activityIndicator = activityIndicator {
            tableView.reloadData()
            activityIndicator.startAnimating()

            // Have activity indicator time out after one second
            let delay = 1
            DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(delay)) {
                // if the empty state is the "Location Not Found" state, clear the text in the search bar
                if !self.isNetworkDown {
                    self.searchBar.text = nil
                    self.searchBar.placeholder = Constants.Phrases.searchPlaceholder
                }
                activityIndicator.stopAnimating()
                self.activityIndicator = nil
                self.tableView.reloadData()
