I have a PageRenderer to Add Action icon to the top right, which does social sharing function. Here is the code:
public override void ViewDidLoad()
{
base.ViewDidLoad();
NavigationItem.RightBarButtonItem = new UIBarButtonItem (UIBarButtonSystemItem.Action, ShareProduct); // Action icon not displaying
}
private void ShareProduct(object sender, EventArgs e) {
var shareItems = new List<NSObject> ();
shareItems.Add (new NSString("Share blahblah"));
var activityController = new UIActivityViewController (shareItems.ToArray (), null);
PresentViewController (activityController, true, null);
}
I know I can use ToolbarItems.Add(new ToolbarItem("name", "icon path", Action)); on X.F side just like Todo List sample, but I wanna use UIBarButtonSystemItem.Action so that I can use iOS native Social Sharing.
Thank you.