I have a pretty simple question, but am still finding my way around cocoa. I have a normal rootViewController App as created in Xcode. In the AppDelegate I have a function to update the database. When a Push-message comes in while running (didReceiveRemoteNotification:) the data is updated.
But how do I get a handle on the the RootViewController telling it to update its objects and then reload the table (which is a function)?
You can use
NSNotificationCenter
, see NSNotificationCenter Class ReferenceIn your
rootViewController
'sviewDidLoad
, add the following:and add the following method:
In your
AppDelegate
'sdidReceiveRemoteNotification
, add the following: