Using a iOS UITabBar with MVVMCross MvxViewController not MvxTabBarViewController

岁酱吖の 提交于 2019-12-24 15:07:15

问题


We have a 4 views that are considered siblings in the UX design and so we would like to display them on a TabBar in iOS. We already have them in a NavigationDrawer in Android.

Lets call them

  1. Customer
  2. CustomerOrders
  3. CustomerHistory
  4. Returns

These are represented by 4 separate ViewModels. Looking at the MvxTabBarViewController samples I have to created a Uber ViewModel that exposes all 4 ViewModels as properties. Then attach the 4 views (MvxViewControllers) to a Parent View (MvxTabViewController).

UPDATE

I don't want to create a ViewModel just to support iOS' way of doing things. I tried creating a UITabBar as a standalone view but that fails to deal with more than 5 items.

I have given up trying to fight the toolbar and am going to create a iOS specific ViewModel to host the Customer, CustomerOrders, CustomerHistory and Returns ViewModels. That is how the MvxTabViewController wants me to do it so I will. Getting that to work involves some MVVMCross configuration that I think is best handled by a new question. Once created I will link to it from here New question

Any suggestions?

来源:https://stackoverflow.com/questions/30107355/using-a-ios-uitabbar-with-mvvmcross-mvxviewcontroller-not-mvxtabbarviewcontrolle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!