0

I have a tab bar, an every item of it embedded in navigation controller, and several child viewControllers! and I have a pop up view which I created in a new viewController!! to show my popUp I had to choose "present modally"! when I go to a new viewController from my popUp on pressing button, it's not embedded in my navigation controller! is there any way to fix it? and the new viewControl also stays embed in navigation to show my tab bar

Azin Nilchi
  • 849
  • 1
  • 10
  • 24

1 Answers1

2

Unfortunately, what you are trying to achieve is not right, and please do not proceed with your initial plan.

I strongly believe a quick look at this could help you understand better UINavigationController and the difference between push vs present UIViewController in iOS.

As an answer to your question, you can imitate your wanted behaviour, but there is no direct native iOS way to accomplished your goal. Better, use pushViewController:animated: instead of present. More in the apple dev site - here.

dvp.petrov
  • 1,110
  • 13
  • 20
  • thank you for your complete answer! although I knew It was not the right way, but I needed to create a pop up! and the only way to show a pop up with blur background, was to present the viewcontroller modally! :( so I have to search for a new way to create my pop Up! thanks – Azin Nilchi Apr 18 '18 at 05:39