From b8e94316e41eba72d927d5ca7d931b26139ee8ff Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 15 六月 2020 09:12:53 +0800
Subject: [PATCH] 20200612

---
 Shared.IOS/Utils/HDLUtils.cs |   44 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/Shared.IOS/Utils/HDLUtils.cs b/Shared.IOS/Utils/HDLUtils.cs
index ebf00aa..fdcd5a6 100644
--- a/Shared.IOS/Utils/HDLUtils.cs
+++ b/Shared.IOS/Utils/HDLUtils.cs
@@ -11,6 +11,15 @@
         public static int RectCornerBottomLeft = 4;
         public static int RectCornerBottomRight = 8;
 
+        /// <summary>
+        /// 鍏ㄥ眬鎵撳嵃
+        /// </summary>
+        public static void WriteLine(object mes)
+        {
+#if DEBUG
+            Console.WriteLine (mes);
+#endif
+        }
 
         public static void RestartApp() {
 
@@ -21,6 +30,18 @@
         }
 
 
+        public static UIColor GetUIColorWithUint(uint uintColor)
+        {
+
+            byte r, g, b, a;
+            r = (byte)(uintColor / 256 / 256 % 256);
+            g = (byte)(uintColor / 256 % 256);
+            b = (byte)(uintColor % 256);
+            a = (byte)(uintColor / 256 / 256 / 256 % 256);
+
+            return UIKit.UIColor.FromRGBA(r, g, b, a);
+        }
+
         /// <summary>
         /// 鐢熸垚浜岀淮鐮�
         /// </summary>
@@ -31,5 +52,28 @@
             return null;
         }
 
+        /// <summary>
+        /// 璺宠浆鎵撳紑APP鎴栬�匒pp Store涓嬭浇鍦板潃
+        /// </summary>
+        /// <param name="url"></param>
+        public static void OpenUrl(string url)
+        {
+            UIApplication.SharedApplication.OpenUrl(new Foundation.NSUrl(url));
+
+            //if (UIApplication.SharedApplication.CanOpenUrl(new Foundation.NSUrl(url)))
+            //{
+            //    UIApplication.SharedApplication.OpenUrl(new Foundation.NSUrl(url));
+            //}
+        }
+
+        /// <summary>
+        /// 璺宠浆鎵撳紑APP
+        /// </summary>
+        /// <param name="url"></param>
+        public static void OpenApp(string url)
+        {
+            UIApplication.SharedApplication.OpenUrl(new Foundation.NSUrl(url));
+        }
+
     }
 }

--
Gitblit v1.8.0