TL; DR - Check the code below.
I started with the axxixc approach, but ran into some problems. I tried to show the view using the method tabBarController:shouldSelectViewController: UITabBarControllerDelegate. However, iOS complained about a view already in the view hierarchy, which is obvious when you think about it, because the whole point of using UITabBarController in IB is that iOS processes instances of these views for us. So, I removed the parental look from him and stopped the mistakes, but the approach was still not felt so fragile. It also did not give me control over whether I wanted to re-create the view every time the model came out, which in my case I did.
, , IB, , . tabBarController:shouldSelectViewController: . , IB, , false .
:
func tabBarController(tabBarController: UITabBarController!, shouldSelectViewController viewController: UIViewController!) -> Bool {
if viewController.title? == DUMMY_POST_VIEW_CONTROLLER_TITLE {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let actualController = storyboard.instantiateViewControllerWithIdentifier("ActualViewController") as ActualViewController
presentViewController(actualController, animated: true, completion: nil)
return false
}
return true
}