I have one ViewController that I can click on by clicking TabBarItem or from Table View Controller B by clicking the plus in the navigation bar.
My problem
How, by clicking on the "Cancel" button on the ViewController, I can go to Table View Controller B if I got into the ViewController from the table view controller B, by clicking the plus or go to the "Table Controller" if I got into the ViewController by selecting the second one ( blue) tab item?
I want to set two actions on the Cancel button on the ViewController - depending on the previous controller, I want to go to TableViewControllerA or TableViewControllerB, is this possible?
More details
The first version of the transition: By clicking the Plus button on TableViewControllerB, I go to ViewController and in ViewController, I click on the "Cancel" button and return to TableViewControllerB.
Second version of the transition: By clicking on the second TabBarItem on the TabBar controller, I go to the ViewController and the ViewController, I click the Cancel button and return to TableViewControllerA.

source
share