I have a requirement to implement in-app purchase in my Xamarin.forms application. After digging google about this I came to know that I have to write native IOS code for in-app purchase. So before I could start anything I am stuck at how to navigate to Xamarin.IOS UIViewController from Xamarin.Forms MasterDetailPage ItemSelected Event. I have written the following code and somehow (through dependency service) I managed to open the UIViewController after this but I am unable to find a way to go back to masterdetailpage navigation for my other pages. Where I am wrong please suggest.:
region INativeControllerLoaderService implementation
public void LoadNativeController (Enums.eNativeController eController)
{
window = new UIWindow (UIScreen.MainScreen.Bounds);
viewController = new NonConsumableViewController();
navigationController = new UINavigationController();
navigationController.PushViewController (viewController, false);
window.RootViewController = navigationController;
window.MakeKeyAndVisible ();
}
#endregion