Monday, June 15, 2026
HomeiOS Developmentios - Calling is no-ops and it'll set off one other...

ios – Calling [UINavigationController pushViewController:animated:] is no-ops and it’ll set off one other pushViewController

[ad_1]

I’m at present engaged on the next state of affairs, i have to push two viewController (A and B) in sequence briefly time.

So that is what i do.

  1. First name, [UINavigationController pushViewController:vcA animated:yes]
  2. In [navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated], i name [UINavigationController pushViewController:vcB animated:yes]

Since i’ve overrides a few of capabilities in [UINavigationController pushViewController:animated], i would like [UINavigationController pushViewController:animated] solely triggered twice, one when pushing vcA and one when pushing vcB.

Nevertheless, the present state of affairs is that [UINavigationController pushViewController:animated] shall be triggered for 3 times:

  1. First time after we name [UINavigationController pushViewController:vcA animated:yes]
  2. Second time after we name [UINavigationController pushViewController:vcB animated:yes]. Nevertheless, that is unusual as a result of at this level, this isn’t doing something. I checked NavigationController.viewControllers and discover that vcB didn’t get pushed
  3. Third time, [UINavigationController pushViewController:vcB animated:yes] is triggered once more, and it’s triggered by [_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:], the total stacktrace may be seen right here

So my query is, the place did the third [UINavigationController pushViewController:vcB animated:yes] come from? I’m sure that i didn’t override any _UIViewControllerTransitionCoordinator.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments