27 lines
864 B
C#
27 lines
864 B
C#
using Pixiview.iOS.Renderers;
|
|
using Pixiview.UI;
|
|
using UIKit;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Platform.iOS;
|
|
|
|
[assembly: ExportRenderer(typeof(AdaptedNavigationPage), typeof(AdaptedNavigationPageRenderer))]
|
|
namespace Pixiview.iOS.Renderers
|
|
{
|
|
public class AdaptedNavigationPageRenderer : NavigationRenderer
|
|
{
|
|
public override void WillMoveToParentViewController(UIViewController parent)
|
|
{
|
|
if (Element is AdaptedNavigationPage navigation)
|
|
{
|
|
NavigationBar.Translucent = true;
|
|
|
|
var barHeight = NavigationBar.Frame.Height;
|
|
var statusHeight = UIApplication.SharedApplication.StatusBarFrame.Height;
|
|
navigation.SetNavigationBarHeight(barHeight, statusHeight);
|
|
}
|
|
|
|
base.WillMoveToParentViewController(parent);
|
|
}
|
|
}
|
|
}
|