将MvvmCross与UIPageViewController结合使用
问题描述:
是否可以使用带有MvvmCross的UIPageViewController(iOS)?将MvvmCross与UIPageViewController结合使用
我已经使用Xamarin,但我现在试图用它与MvvmCross。
我基本上得到的地方,我需要设置需要我来覆盖这些方法UIPageViewControllerDataSource点:
public override UIViewController GetNextViewController(UIPageViewController pageViewController, UIViewController referenceViewController)
public override UIViewController GetPreviousViewController(UIPageViewController pageViewController, UIViewController referenceViewController)
两者给我一个UIViewController回来,而不是MvxViewController。
我很新的MvvmCross,可能错过了一些东西,但我可以看到有其他来源类,如MvxSimpleTableViewSource为MvxTableViewController和我想的图像,有可能是一个MvxPageViewControllerDataSource一个MvxPageViewController?
另外我看到CheeseBaron已经创建了一个绑定的androidrPagerAdapter。所以我猜这是不可能的,但我可以创建像CheeseBaron一样的自己的绑定吗?
我正确吗?还是有另一种方式?
答
我试了一下解决这个问题,见my article here和GitHub repo。
简短版本中,我没有使用UIPageViewController
,而是使用UIPageControl/UIScrollView
组合为iOS自定义演示者。
是 - 像Cheesebaron一样创建副本。为开放源代码和荣耀贡献它们! – Stuart 2014-10-10 18:43:57