summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.iOS
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.ControlGallery.iOS')
-rw-r--r--Xamarin.Forms.ControlGallery.iOS/CustomRendererBugzila38731.cs29
-rw-r--r--Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj1
2 files changed, 30 insertions, 0 deletions
diff --git a/Xamarin.Forms.ControlGallery.iOS/CustomRendererBugzila38731.cs b/Xamarin.Forms.ControlGallery.iOS/CustomRendererBugzila38731.cs
new file mode 100644
index 00000000..0ae8d969
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.iOS/CustomRendererBugzila38731.cs
@@ -0,0 +1,29 @@
+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)
+ {
+ NavigationController.TopViewController.NavigationItem.SetLeftBarButtonItem(new UIBarButtonItem(
+ UIImage.FromFile("bank.png"), UIBarButtonItemStyle.Plain, (sender, args) =>
+ {
+ NavigationController.PopViewController(true);
+ }), true);
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj b/Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj
index 4e2e7706..00d23ecc 100644
--- a/Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj
+++ b/Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj
@@ -169,6 +169,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<None Include="packages.config" />
<Compile Include="CustomRenderers.cs" />
+ <Compile Include="CustomRendererBugzila38731.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xamarin.Forms.Controls\Xamarin.Forms.Controls.csproj">