share settings, UI adjust

This commit is contained in:
2020-05-08 20:14:51 +08:00
parent ca46fd35fe
commit 2558c1a75f
12 changed files with 96 additions and 48 deletions

View File

@@ -6,7 +6,6 @@ using Pixiview.iOS.Services;
using Pixiview.Resources;
using Pixiview.Utils;
using UIKit;
using Xamarin.Essentials;
using Xamarin.Forms;
[assembly: Dependency(typeof(EnvironmentService))]
@@ -28,30 +27,32 @@ namespace Pixiview.iOS.Services
#region - Theme -
/*
[SuppressMessage("Code Notifications", "XI0002:Notifies you from using newer Apple APIs when targeting an older OS version", Justification = "<Pending>")]
public OSAppTheme GetApplicationTheme()
public AppTheme GetApplicationTheme()
{
if (UIDevice.CurrentDevice.CheckSystemVersion(12, 0))
{
var currentController = Platform.GetCurrentUIViewController();
if (currentController == null)
{
return OSAppTheme.Unspecified;
return AppTheme.Unspecified;
}
var style = currentController.TraitCollection.UserInterfaceStyle;
if (style == UIUserInterfaceStyle.Dark)
{
return OSAppTheme.Dark;
return AppTheme.Dark;
}
else if (style == UIUserInterfaceStyle.Light)
{
return OSAppTheme.Light;
return AppTheme.Light;
}
}
return OSAppTheme.Unspecified;
return AppTheme.Unspecified;
}
//*/
public void SetStatusBarStyle(StatusBarStyles style)
{