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

Navigate Back from Xamarin.Social Component - iOS Project with Xamarin Forms

$
0
0

I am working with the Xamarin.Social Component for Xamarin Forms - all is OK to share out a tweet;

The issue is the navigation process, back to a Content Page, within the Portable Class Library;

A PageRenderer is utilized on the iOS native side to display the Xamarin.Social Component;

The below code snippets show the attempted navigation flow - however, navigation does not bring the user back to the New Stream, away from the Twitter Page; in debug mode, the navigation does take place; any insight, guidance is appreciated;

[assembly: ExportRenderer(typeof(TwitterPage), typeof(TwitterPageRenderer))]

public class TwitterPageRenderer : PageRenderer
{
public override void ViewDidAppear(bool animated)
{
base.ViewDidAppear(animated);

    var backButton = new StringElement ("Back to News Stream");
        backButton.Tapped += delegate {
            ReturnToNewsStream();
        };
}

public void ReturnToNewsStream()
{
    ((TwitterPage)Element).DoNavigation();
}

}

On the Portable Class Library side -

public class TwitterPage : ContentPage
{
public void DoNavigation()
{
Navigation.PushAsync(new MyPageLand());
}
}


Viewing all articles
Browse latest Browse all 75885

Trending Articles



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