You can use NSNotificationCenter to update your tableView from another view.
Your declaration -addObserver: should be this way in your tableView Controller in viewDidLoad :
override func viewDidLoad() { super.viewDidLoad() NSNotificationCenter.defaultCenter().addObserver(self, selector: "refreshTable:", name: "refresh", object: nil) }
And your function for this addObserver will like it:
func refreshTable(notification: NSNotification) { println("Received Notification") self.tableView.reloadData() }
Now you can send notifications like this when you go to your tableView controller:
NSNotificationCenter.defaultCenter().postNotificationName("refresh", object: nil, userInfo: nil)
Check out the IT sample project for more information.
Hope this helps you.
source share