Skip to content

Instantly share code, notes, and snippets.

@wsrzx
Created September 21, 2017 23:00
Show Gist options
  • Save wsrzx/2fced5020a68880e497e580a1acbc3ab to your computer and use it in GitHub Desktop.
Save wsrzx/2fced5020a68880e497e580a1acbc3ab to your computer and use it in GitHub Desktop.
iOS 11 Large Titles in Xamarin.Forms
using System;
using MyApp.iOS;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(NavigationPage), typeof(NavigationBarRenderer))]
namespace MyApp.iOS
{
public class NavigationBarRenderer : NavigationRenderer
{
protected override void OnElementChanged(VisualElementChangedEventArgs e)
{
base.OnElementChanged(e);
//https://developer.apple.com/ios/human-interface-guidelines/bars/navigation-bars/
NavigationBar.PrefersLargeTitles = true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment