标签栏控制器导航Xamarin与MVVM光

标签栏控制器导航Xamarin与MVVM光

本文介绍了标签栏控制器导航Xamarin与MVVM光的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS标准MVVM Light故事板模式

iOS standard MVVM Light storyboard pattern is

导航 - >视图控制器 - >其他视图

Nav -> View Controller -> Other Views

但是我想使用标签栏控制器作为根视图,到目前为止没有任何问题,但是当我想从该选项卡视图导航时,在新的viewcontroller中我丢失了标签栏,并且视图加载像标准视图和不喜欢标签式视图。

But i want to use a tab bar controller as root view, up to here no one problems, but when i want to navigate from that tab view, in a new viewcontroller i lost the tab bar, and the view is load like a standard view and not like a "tabbed" view.

我尝试创建以下架构

TabBarController - >导航 - >查看 - >第二个视图

TabBarController -> Navigation -> View -> Second View

但mvvm指示灯模式将导航控制器放在SimpleIoc中,我不能创建多次。

but the mvvm light pattern put the navigation controller in a SimpleIoc and i can't create more than once.

如何设置故事板以确保我在所有视图中都有导航和标签栏?

How i must set the storyboard ensure that i have navigation and tabbar in all the views?

推荐答案

到目前为止我决定使用mvvmlight IoC for ViewModel和View,导航我在PageController的代码后面使用自定义方法和segue

Up to now i resolve using the mvvmlight IoC for ViewModel and View, for navigation i use custom method in PageController's code behind and segue

这篇关于标签栏控制器导航Xamarin与MVVM光的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 01:03