Reputation: 9703
Is it possible to use a UIPageViewController(iOS) with MvvmCross?
I have used both with Xamarin but I am now trying to use it with MvvmCross.
I basically get to the point where I need to set the UIPageViewControllerDataSource which requires me to override these methods:
public override UIViewController GetNextViewController(UIPageViewController pageViewController, UIViewController referenceViewController)
public override UIViewController GetPreviousViewController(UIPageViewController pageViewController, UIViewController referenceViewController)
both of which give me a UIViewController back rather than a MvxViewController.
I am very new to MvvmCross and might have missed something but I can see that there are other source classes like MvxSimpleTableViewSource for MvxTableViewController and I would image that there might be a MvxPageViewController with a MvxPageViewControllerDataSource?
Also I see that CheeseBaron has created a binding for the PagerAdapter in android here. So Im guessing it is not possible out of the box but I could if I created my own binding like CheeseBaron did?
Am I correct? or is there another way?
Upvotes: 2
Views: 1882
Reputation: 3136
I took a stab at solving this problem, see my article here, and the GitHub repo.
The short version, I didn't use a UIPageViewController
, but rather did a custom presenter for iOS using a UIPageControl/UIScrollView
combination.
Upvotes: 1