0

Suppose I have 3 tabs on tab bar controller:

  • TabAViewController
  • TabBViewController
  • TabCViewController

and in tab C I have one button.

When I click on that button then open the another View (CsubViewController which is not TabAViewController, TabBViewController, TabCViewController). How to call that Another View (CsubViewController) on button click?

And how to come back to the same view after back button click.

1 Answer 1

0

It depends. If you are using a NavigationController as the root controller, you push the CSubViewController in your current ViewController by

navigationController.pushViewController(...)

and go back with

navigationController.popViewControllerAnimated(...)

which is the simplest way to achieve your goal.

Or you can write your own code and try to present the CSubViewController modally in traditional presentViewController(...) and dismissViewController way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.