From 5095bb05ab8ef77e2edc3cad2b94f9d75b30f193 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 13 五月 2020 16:09:21 +0800 Subject: [PATCH] 222222222 --- ZigbeeApp/Home.Ios/MainViewController.cs | 6 +++ ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs | 9 ++++ ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListRefreshControl.cs | 9 ++++ ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs | 46 +++++++++++----------- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs | 9 ++++ ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs | 10 ++++ 6 files changed, 62 insertions(+), 27 deletions(-) diff --git a/ZigbeeApp/Home.Ios/MainViewController.cs b/ZigbeeApp/Home.Ios/MainViewController.cs index 151b277..8304520 100644 --- a/ZigbeeApp/Home.Ios/MainViewController.cs +++ b/ZigbeeApp/Home.Ios/MainViewController.cs @@ -12,6 +12,12 @@ { base.ViewDidLoad(); + //11.0鐗堟湰浠ヤ笅鑷姩鍋忕Щ鍙栨秷 + if (!UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) + { + this.AutomaticallyAdjustsScrollViewInsets = false; + } + if (NSLocale.PreferredLanguages[0].Contains("zh-")) { //if (NSLocale.PreferredLanguages [0].Contains (@"zh-") && NSLocale.PreferredLanguages [0].Contains (@"-CN")) { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs old mode 100755 new mode 100644 index 5ffb606..193e28e --- a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs @@ -204,29 +204,29 @@ { #if iOS try - { - var versionResult = await RequestHttpsiOSAppVersionAsync(); - if (versionResult == null || versionResult.Results == null) - { - return false; - } - var results = Newtonsoft.Json.Linq.JArray.Parse(versionResult.Results.ToString()); - if (results[0] == null) - { - return false; - } - var newVersion = results[0]["version"]?.ToString(); - var updateContent = results[0]["releaseNotes"]?.ToString(); - if (newVersion != CommonPage.CodeIDString) - { - return true; - } - return false; - } - catch - { - return false; - } + { + var versionResult = await RequestHttpsiOSAppVersionAsync(); + if (versionResult == null || versionResult.Results == null) + { + return false; + } + var results = Newtonsoft.Json.Linq.JArray.Parse(versionResult.Results.ToString()); + if (results[0] == null) + { + return false; + } + var newVersion = results[0]["version"]?.ToString(); + var updateContent = results[0]["releaseNotes"]?.ToString(); + if (newVersion.CompareTo(CommonPage.CodeIDString) > 0) + { + return true; + } + return false; + } + catch + { + return false; + } #elif Android try diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs old mode 100755 new mode 100644 index 8038b83..ac8eb1d --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs @@ -41,7 +41,14 @@ /// <param name="i_rowSpace">琛屼箣闂寸殑闂磋窛(杩欎釜鍊兼槸涓庤鎺т欢缁戝畾涓�璧蜂娇鐢ㄧ殑)</param> public VerticalFrameControl(int i_rowSpace = 0) { - rowSpace = Application.GetRealHeight(i_rowSpace); + rowSpace = Application.GetRealHeight(i_rowSpace); +#if iOS + //鑷姩鍋忕Щ鍙栨秷 + if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) + { + (this.uiView as UIKit.UIScrollView).ContentInsetAdjustmentBehavior = UIKit.UIScrollViewContentInsetAdjustmentBehavior.Never; + } +#endif } /// <summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs old mode 100755 new mode 100644 index 42583b1..24c3bdf --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs @@ -42,7 +42,15 @@ public VerticalFrameRefreshControl(int i_rowSpace = 0) { rowSpace = Application.GetRealHeight(i_rowSpace); - this.VerticalScrollBarEnabled = false; + this.VerticalScrollBarEnabled = false; + +#if iOS + //鑷姩鍋忕Щ鍙栨秷 + if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) + { + (this.uiView as UIKit.UIScrollView).ContentInsetAdjustmentBehavior = UIKit.UIScrollViewContentInsetAdjustmentBehavior.Never; + } +#endif } /// <summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs old mode 100755 new mode 100644 index 9d2e43b..4947e92 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs @@ -49,7 +49,14 @@ /// <param name="i_rowSpace">琛屼箣闂寸殑闂磋窛(杩欎釜鍊兼槸涓庤鎺т欢缁戝畾涓�璧蜂娇鐢ㄧ殑)</param> public VerticalListControl(int i_rowSpace = 0) { - this.rowSpace = Application.GetRealHeight(i_rowSpace); + this.rowSpace = Application.GetRealHeight(i_rowSpace); +#if iOS + //鑷姩鍋忕Щ鍙栨秷 + if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) + { + (this.uiView as UIKit.UIScrollView).ContentInsetAdjustmentBehavior = UIKit.UIScrollViewContentInsetAdjustmentBehavior.Never; + } +#endif } #endregion diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListRefreshControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListRefreshControl.cs old mode 100755 new mode 100644 index 25fd9b0..45a6689 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListRefreshControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListRefreshControl.cs @@ -50,7 +50,14 @@ public VerticalListRefreshControl(int i_rowSpace = 0) { this.rowSpace = Application.GetRealHeight(i_rowSpace); - this.VerticalScrollBarEnabled = false; + this.VerticalScrollBarEnabled = false; +#if iOS + //鑷姩鍋忕Щ鍙栨秷 + if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) + { + (this.uiView as UIKit.UIScrollView).ContentInsetAdjustmentBehavior = UIKit.UIScrollViewContentInsetAdjustmentBehavior.Never; + } +#endif } #endregion -- Gitblit v1.8.0