Present view created programatically upon tab bar selection - iOS

Question

I have a view controller called ContainerViewController which manages 3 views: a main view and two side panels that can slide in from the left or the right. I'm able to present this ContainerView modally within a didSelectRowAt table view delegate method like so:

let containerViewController = ContainerViewController()
self.present(containerViewController, animated: false, completion: nil)

When the ContainerViewController is created, 3 storyboard views (Main, Left, and Right) are added to it, but now I want this to happen when a tab bar selection is made. When working with tab bar controllers, I've only ever used storyboard segues to present views, so how can I achieve this? Thanks in advance!


Show source
| ios   | iphone   | uitabbarcontroller   | presentviewcontroller   2017-03-13 23:03 0 Answers

Answers ( 0 )

◀ Go back