Use MVVM Illuminated Tab Bar (iOS)

I have two tabs in UITabBarController, both of which are UINavigationControllers. The problem is initialization NavigationService, which requires a parameter UINavigationController. I would like to either find a way to have tabs with a navigation controller as root, or find a way to have a tab controller as root.

I get three options:

1. 

                /->  Ctrl 1 -> ctrl 2      
    Nav -> Tab - 
                \->  Ctrl 1 -> ctrl 2

This selection works, but the tab bar is lost when you press another controller with NavigateTo(). This is not a solution, I need tabs everywhere.

2.
        /-> Nav -> Ctrl 1 -> ctrl 2      
   Tab - 
        \-> Nav -> Ctrl 1 -> ctrl 2

It just doesn’t work, because it SimpleIocwants only UINavigationControllerand leads to a failure. Obviously, this is not a solution at all.

3.

Navigate using segue or pushing controllers manually, the 'classic' way.

This completely strikes the purpose of using MVVM-Light, this is not a solution either.

, 3. - .

- ? ?

+5

Source: https://habr.com/ru/post/1655203/


All Articles