Search code examples
swiftuiviewcontrolleruitabbarcontrollerseguexcode6.3

Hide a UIViewController (Screen) in swift


enter image description here

As you can see the screen flow as follows:

After clicking on the 'button2' of 'screen A', app shows 'screen B' from same storyboard which has a tab bar. After clicking on the 'red tab' of 'screen B', app shows the 'green button'(right corner). After clicking on the 'green button' of 'screen B', app shows 'screen C'of Storyboard 2.

I need to go back to 'screen B' of 'Storyboard 1' after clicking the back button of 'screen C', no matter from where exactly 'screen C' has appeared and the 'screen C' of 'Storyboard 2' should disappear from top to bottom.

Is it possible to do so, if yes then how?


Solution

  • I implement segue and add the animation and it works.