I have UITableView
as my rootViewController
and I populate that table with parsed RSS (there's a Parser
class where my rootViewController
is its delegate). In the rootViewController
I have methods for refreshing RSS refreshData
and I keep my retreived data in a static MutableArray
staticItems:
On clicking a cell in tableView
cell the detailView
gets pushed on the navigationController
while at the same time (on selecting the cell (row)) I create and pass a dictionary theItem
to the detailView
. In that dictionary I pass the values from staticItems
and the positionInArray
(index of selected cell). This way I can show the text of the news and keep track about the position of the news in the array of news to implement slide prev/next.
Now, I enabled push notifications and on receiving one my app is back to foreground but with the view that was opened last time when app was closed.
I would like to present the last news in detailView by re-parsing (refreshing) the RSS and presenting the last news (theItem[0]).
So, I would like to have the result of the following: calling the [rootController refreshData]
and then selecting the first item in the cell and opening it in detailView
I've been playing with the delegate method didReceiveRemoteNotification
, but I can't find the way of making it work. I tried creating new rootController
, but then I stack it over existing one :(.
Please share your thoughts with me :)