0
votes

My use case as follows:

  • VC1 - Root Controller
  • VC2 & VC3 are different view controllers
  • VC1 is delegate of VC2
  • VC1 presents VC2
  • Then as delegated, VC1 dismiss VC2
  • Right after dismiss VC2, VC1 presents VC3

In the last step my transition goes bad as after dismissVC2 and beforePresentVC3, VC1 is visible during transition

How can I fix this problem or is it even possible??

NOTE: I want VC1 in window herirarchy so that I can go to VC1 from VC3

1
[self dismissViewControllerAnimated:NO completion:^{ //while dismising VC2 ,present VC3 here with animated NO }]; - Muhammad Adnan
NO i am saying while dismising VC2 - Muhammad Adnan
I tried that..did not work which means VC1 is visible while VC3 is being presented. - GJain
you are using animate :yes while presenting VC3 ? - Muhammad Adnan
@adnan yes..I am usign :yes - GJain

1 Answers

1
votes

I think you're getting into some trouble with no sense. You could easily have a hidden navigationController and create and stack every VC and then move around with

self.navigationController popToViewController: animated:

or

self.navigationController pushToViewController: animated:

then you could move from 1 to 3, or 3 to 1 with no problem. If you created all the VCs and are available to access from any of the 3 vcs