I’ve created a Download Manager which is pretty much a TTTableViewController and it’s accompanying DataModel is a pretty much an ASINetworkQueue.
So, when I’ve created a function in my view controller that in turns call my [dataModel addDownloadWithNameAndUrl: url:] and I get a new download added to the NetworkQueue, which starts, and is being displayed on the TTTableViewController and updates progress bars and the rest.
I’ve also mapped the DownloadManagerViewController class to a URL, and I can use the TTNavigator to open the download manager.
Now for my question. Is there a way I can call the url to execute the requested function without switching to the View Controller? How could I accomplish some
Well as a matter of fact it appears to be rather simple although it took me a while to figure it out.
Thee20 Navigator has method:
By using that, throughout the application you can get an instance of your view controller that you have assigned to the url. However the trick is that if you have set the url as a
each time you get a new instance of the View Controller.
In my case however, I wanted to use the already instantiated view controller so I need to setup the url as a sharedViewController.
So I’ve added a new method to my view controller which now I can call without switching the UI to it.