Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Returning to Xamarin.Forms View from Platform-Specific PageRenderer

$
0
0

Hi all,

I'm currently exploring using ARKit (iOS) and ARCore (Android) in a Xamarin.Forms project. Since Augmented Reality is platform-dependent and doesn't appear to be exposed in the Forms API yet (unless I'm mistaken), I've opted to implement a platform-specific page renderer for the page I want to leverage AR functionality. Using PageRenderers, I am able to easily present the platform-specific view. However, after finishing platform-dependent work on this new view, I would like a button on screen to return to a new view that is shared by both platforms.

i.e - FormsPage1 > FormsPage2 > PlatformPage > FormsPage3

[assembly:ExportRenderer(typeof(ARSandbox.Views.ARSandboxPage), typeof(ARSandbox.iOS.ARSandboxPageRenderer))]
namespace ARSandbox.iOS
{

    public class ARSandboxPageRenderer : PageRenderer, IARSCNViewDelegate
    {

        /* Lots of neat AR Code for iOS */

        FinishedButton.TouchUpInside += (sender, e) =>
        {
            // TODO: return to a new Xamarin.Forms page
        };

Whats the best way to achieve this? I am using Prism.Forms and an MVVM pattern if it helps


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>