From 767e3abed9c1e9a831a90357ee046a24b3a161b9 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 14 七月 2020 17:21:49 +0800
Subject: [PATCH] 2020-07-14-3
---
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