[iOS] Misc fixes

This commit is contained in:
David Oliver 2019-05-18 22:05:43 -04:00
commit 4a84523351
2 changed files with 7 additions and 3 deletions

View file

@ -106,7 +106,11 @@ namespace CalculatorApp
public static string GetAppViewState() public static string GetAppViewState()
{ {
String newViewState; String newViewState;
#if NETFX_CORE
CoreWindow window = CoreWindow.GetForCurrentThread(); CoreWindow window = CoreWindow.GetForCurrentThread();
#else
var window = Windows.UI.Xaml.Window.Current;
#endif
if ((window.Bounds.Width >= 560) && (window.Bounds.Height >= 356)) if ((window.Bounds.Width >= 560) && (window.Bounds.Height >= 356))
{ {
newViewState = ViewState.DockedView; newViewState = ViewState.DockedView;

View file

@ -573,7 +573,7 @@ namespace CalculatorApp.ViewModel
m_decimalSeparator = LocalizationSettings.GetInstance().GetDecimalSeparator(); m_decimalSeparator = LocalizationSettings.GetInstance().GetDecimalSeparator();
#if !__WASM__ #if !__WASM__ && !__IOS__
if (CoreWindow.GetForCurrentThread() != null) if (CoreWindow.GetForCurrentThread() != null)
{ {
// Must have a CoreWindow to access the resource context. // Must have a CoreWindow to access the resource context.