First of all, thanks for all the help I am receiving through stackoverflow.
I am making an app which takes information from a tableview and pass it to a viewController using the presentViewController method. Now I want to put a Back button to go back to the screen it was called.
Is it possible to accomplish that?
I do not want to put a segway because I want to use the same ViewController to display information coming from different ViewControllers to avoid creating a Viewcontroller (detailing the info) for every ViewController (that has the info resumed).
Let's put it this way, I have
First ViewControler Second ViewControler Third ViewControler Fourth ViewControler
DetailViewController (that displays the item info coming from one of the ViewControllers above)
From the First to the Fourth, each one has product information resumed, but I want to display the details depending on what item is tapped, then I show another ViewController with the item details, but I want to create one ViewController, instead of creating one ViewController for each.
Thanks!
What you are asking is possible, but it sounds to me like you are trying to prematurely optimise for performance by not recreating the detail view controller each time. Is it really that expensive to recreate the detail view controller each time?
As far as the back button from the presented view controller, just add a UINavigationItem to your detail view controller that dismisses the view controller when actioned.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments