0

This is the question about non-trivial transition from one controller to another.

I have a team list screen which has Plus button (+) that when clicked modally opens navigation controller with root screen Create Team Stage 1 after which Create Team Stage 2 follows.

Team List -(modal presentation)-> NavigationController -(push)-> CreateTeam1 -(push)-> CreateTeam2

Also it is possible to fall into Team N Details screen after clicking on Team N from that Team List:

TeamList -(push)-> Team N

I have requirement that after new team N is created on CreateTeam2 there should be Team N Details screen that appear modally so it could look the same as if we would fall into that Team N from the Team List screen (of course with navigation bar and < button in it).

The goal is to create presentation: Create2 -(???)-> Team N so that this newly created Team N Details screen was moved to another hierarchy so like it was presented as old existing team from Team List.

Is it possible to archieve that kind of transition?

P.S. I have already accomplished transition: Create Team 2 -(dismiss/pop)-> Team List using dismiss/pop, but it looks like we go to the Team N Details screen through blinking Team List and that looks bad in terms of user experience.

Stanislav Pankevich
  • 11,044
  • 8
  • 69
  • 129

1 Answers1

0

Finally I was able to achieve that kind of transition:

Given I have custom segue: Push segue in xcode with no animation I do the following sequence of steps:

  • On my CreateTeam2 the team is created
  • I do push with no animation: TeamList -(push-no-animation)-> TeamN (This does not affect current CreateTeam2 screen that is currently on screen but as result I have Team N to be the top in that view hierarchy.
  • Within CreateTeam2 I do [CreateTeam1 dismissOrPopViewControllerAnimated:YES]

So it looks like CreateTeam2 disappears and reveals already existing Team N screen - exactly what I needed.

Community
  • 1
  • 1
Stanislav Pankevich
  • 11,044
  • 8
  • 69
  • 129