Родитель
9395dd5c94
Коммит
5bc0e5ab0a
|
@ -34,6 +34,7 @@ namespace Xamarin.Forms
|
|||
static bool? s_isiOS9OrNewer;
|
||||
static bool? s_isiOS10OrNewer;
|
||||
static bool? s_isiOS11OrNewer;
|
||||
static bool? s_respondsTosetNeedsUpdateOfHomeIndicatorAutoHidden;
|
||||
#endif
|
||||
|
||||
#if __MOBILE__
|
||||
|
@ -67,6 +68,16 @@ namespace Xamarin.Forms
|
|||
return s_isiOS11OrNewer.Value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!s_respondsTosetNeedsUpdateOfHomeIndicatorAutoHidden.HasValue)
|
||||
s_respondsTosetNeedsUpdateOfHomeIndicatorAutoHidden = new UIViewController().RespondsToSelector(new ObjCRuntime.Selector("setNeedsUpdateOfHomeIndicatorAutoHidden"));
|
||||
return s_respondsTosetNeedsUpdateOfHomeIndicatorAutoHidden.Value;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static IReadOnlyList<string> s_flags;
|
||||
|
|
|
@ -104,7 +104,7 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
{
|
||||
base.ViewDidLoad();
|
||||
SetNeedsStatusBarAppearanceUpdate();
|
||||
if (Forms.IsiOS11OrNewer)
|
||||
if (Forms.RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden)
|
||||
SetNeedsUpdateOfHomeIndicatorAutoHidden();
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
{
|
||||
base.ViewDidLoad();
|
||||
SetNeedsStatusBarAppearanceUpdate();
|
||||
if (Forms.IsiOS11OrNewer)
|
||||
if (Forms.RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden)
|
||||
SetNeedsUpdateOfHomeIndicatorAutoHidden();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
UpdateBarTextColor();
|
||||
UpdateUseLargeTitles();
|
||||
UpdateHideNavigationBarSeparator();
|
||||
if (Forms.IsiOS11OrNewer)
|
||||
if (Forms.RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden)
|
||||
SetNeedsUpdateOfHomeIndicatorAutoHidden();
|
||||
|
||||
// If there is already stuff on the stack we need to push it
|
||||
|
|
|
@ -176,7 +176,7 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
|
||||
_appeared = true;
|
||||
UpdateStatusBarPrefersHidden();
|
||||
if(Forms.IsiOS11OrNewer)
|
||||
if(Forms.RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden)
|
||||
SetNeedsUpdateOfHomeIndicatorAutoHidden();
|
||||
|
||||
if (Element.Parent is CarouselPage)
|
||||
|
@ -439,7 +439,7 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
|
||||
void UpdateHomeIndicatorAutoHidden()
|
||||
{
|
||||
if (Element == null || !Forms.IsiOS11OrNewer)
|
||||
if (Element == null || !Forms.RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden)
|
||||
return;
|
||||
|
||||
SetNeedsUpdateOfHomeIndicatorAutoHidden();
|
||||
|
|
|
@ -339,7 +339,7 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
_detailController.AddChildViewController(detailRenderer.ViewController);
|
||||
|
||||
SetNeedsStatusBarAppearanceUpdate();
|
||||
if (Forms.IsiOS11OrNewer)
|
||||
if (Forms.RespondsToSetNeedsUpdateOfHomeIndicatorAutoHidden)
|
||||
SetNeedsUpdateOfHomeIndicatorAutoHidden();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче