2

I am using UINavigation controller as root view controller to navigate my app.After login/sign-up my app launches UITab-Bar-Controller which has static tabs(UI-View-Controllers),which is created/linked in storyboard.

Here I am getting nil in presenter obj in my tab bar (view-controller) class, because may be i only pushed UI-Tab-Bar-Controller not viewController in UINavigationController and when I try to call presenter. Also I have no clue how do I manage tab bar internal class while changing tabs.

Andreas ZUERCHER
  • 862
  • 1
  • 7
  • 20
RviOS
  • 33
  • 6
  • I also followed this steps but not succeed https://stackoverflow.com/questions/30216150/how-a-uitabbarcontroller-fit-into-the-viper-architecture/37690383#37690383 – RviOS Aug 20 '17 at 17:13

1 Answers1

1

When you create your NavigationController this should be contained within a VIPER router/module.

This in turn creates several child VIPER modules (one for each tab) each of which will give you a UIViewController that you can associate with each tab.

The base module will hold into each child module ensuring they don't get dereferenced.

Scott McKenzie
  • 16,052
  • 8
  • 45
  • 70