maui-linux/Xamarin.Forms.ControlGaller.../CustomRendererBugzila38731.cs

31 строка
1.1 KiB
C#
Исходник Обычный вид История

using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.ControlGallery.iOS;
using Xamarin.Forms.Controls.Issues;
[assembly: ExportRenderer(typeof(Bugzilla38731), typeof(CustomRendererBugzila38731))]
[assembly: ExportRenderer(typeof(Bugzilla38731.PageTwo), typeof(CustomRendererBugzila38731))]
[assembly: ExportRenderer(typeof(Bugzilla38731.PageThree), typeof(CustomRendererBugzila38731))]
[assembly: ExportRenderer(typeof(Bugzilla38731.PageFour), typeof(CustomRendererBugzila38731))]
namespace Xamarin.Forms.ControlGallery.iOS
{
public class CustomRendererBugzila38731 : Platform.iOS.PageRenderer
{
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
if (NavigationController.ViewControllers.Length > 1)
{
2017-05-26 17:58:17 +03:00
var btn = new UIBarButtonItem(UIImage.FromFile("bank.png"), UIBarButtonItemStyle.Plain, (sender, args) =>
{
NavigationController.PopViewController(true);
2017-05-26 17:58:17 +03:00
});
btn.AccessibilityIdentifier = "goback";
NavigationController.TopViewController.NavigationItem.SetLeftBarButtonItem(btn, true);
}
}
}
}