Closed puuurm closed 6 years ago
func applicationDidBecomeActive(_ application: UIApplication) { NotificationCenter.default.post(name: Notification.Name.DidUpdateTime, object: self) NotificationCenter.default.post(name: Notification.Name.DidUpdateUserLocation, object: self) }
@objc func updateCurrent(notification: Notification) { guard let userInfo = notification.userInfo, let index = userInfo["index"] as? Int else { return } let indexPath = IndexPath.init(row: index, section: 0) DispatchQueue.main.async { [weak self] in self?.weatherTableView.reloadRows(at: [indexPath], with: .automatic) } }