Segue from a view controller inside a tab bar to an external table view controller

0

I have the following problem: I have a tab bar view controller with 4 items, each one is a view controller.

The problem is that when I want to make a segue of one of those view controllers to an external table view controller, the view fits into the tab bar controller.

How can I do so that does not happen? Any special segue?

    
asked by Alberto Mier 26.07.2018 в 09:44
source

1 answer

0

Sure, the tabbar controller is a container driver of those 4 viewcontrollers that you have. If you want to move from one to the other, it is the tabBarController that takes care of showing one and removing the other. So if in one of them you want to show another viewcontroller that depends on that, it will remain inside the tabBarController, since the calling viewcontroller is in that tabBarController. What you have to do is when you show that new viewcontroller tell it to disappear the tabBarController and when you come back from that viewcontroller you have to tell it that it has to come back to appear. So in the new viewController that you want to appear you should put

self.tabBarController?.tabBar.isHidden = true

in the viewDidLoad, in the viewWillAppear as best you can and when the viewController is going to close then

self.tabBarController?.tabBar.isHidden = false
    
answered by 26.07.2018 в 11:37