share settings, UI adjust
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user