Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (self.presentedViewController as! tableViewController).table.reloadData()
- (self.navigationController!.viewControllers[self.navigationController!.viewControllers.count - 2] as! tableViewController).table.reloadData()
- extension Notification.Name {
- static let reload = Notification.Name("reload")
- }
- NotificationCenter.default.post(name: .reload, object: nil)
- override func viewDidLoad() {
- super.viewDidLoad()
- NotificationCenter.default.addObserver(self, selector: #selector(reloadTableData), name: .reload, object: nil)
- }
- @objc func reloadTableData(_ notification: Notification) {
- tableView.reloadData()
- }
Add Comment
Please, Sign In to add comment