From af0baaf597653cb5eb63e95e7628deb7ade44f5c Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Fri, 16 Dec 2016 14:35:13 +0000 Subject: [PATCH] Revert custom iOS changes, use fatlib, update .gitignore --- .gitignore | 1 - csharp/.gitignore | 2 ++ csharp/Facebook.Yoga/YogaLogger.cs | 10 +++------- csharp/Facebook.Yoga/YogaNode.cs | 4 ++-- csharp/Xamarin.iOS/CustomBuildAction.targets | 4 ++-- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index db56b123..5b346768 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,3 @@ # Visual studio code .vscode -libyoga.a diff --git a/csharp/.gitignore b/csharp/.gitignore index 533ef745..4729b852 100644 --- a/csharp/.gitignore +++ b/csharp/.gitignore @@ -268,3 +268,5 @@ paket-files/ # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc + +libyoga.a diff --git a/csharp/Facebook.Yoga/YogaLogger.cs b/csharp/Facebook.Yoga/YogaLogger.cs index e8bc1ad1..b0cb4444 100644 --- a/csharp/Facebook.Yoga/YogaLogger.cs +++ b/csharp/Facebook.Yoga/YogaLogger.cs @@ -14,21 +14,18 @@ namespace Facebook.Yoga { internal static class YogaLogger { -#if !__IOS__ [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void Func(YogaLogLevel level, string message); -#endif + private static bool _initialized; -#if !__IOS__ private static Func _managedLogger = null; public static Func Logger = null; -#endif + public static void Initialize() { if (!_initialized) { -#if !__IOS__ _managedLogger = (level, message) => { if (Logger != null) { @@ -41,9 +38,8 @@ namespace Facebook.Yoga } }; Native.YGInteropSetLogger(_managedLogger); -#endif _initialized = true; } } } -} +} \ No newline at end of file diff --git a/csharp/Facebook.Yoga/YogaNode.cs b/csharp/Facebook.Yoga/YogaNode.cs index 1cd7042b..9211b28e 100644 --- a/csharp/Facebook.Yoga/YogaNode.cs +++ b/csharp/Facebook.Yoga/YogaNode.cs @@ -540,7 +540,7 @@ namespace Facebook.Yoga long output = _measureFunction(this, width, widthMode, height, heightMode); return new YogaSize { width = MeasureOutput.GetWidth(output), height = MeasureOutput.GetHeight(output) }; } -#if !__IOS__ + public string Print(YogaPrintOptions options = YogaPrintOptions.Layout|YogaPrintOptions.Style|YogaPrintOptions.Children) { @@ -551,7 +551,7 @@ namespace Facebook.Yoga YogaLogger.Logger = orig; return sb.ToString(); } -#endif + public IEnumerator GetEnumerator() { return _children != null ? ((IEnumerable)_children).GetEnumerator() : diff --git a/csharp/Xamarin.iOS/CustomBuildAction.targets b/csharp/Xamarin.iOS/CustomBuildAction.targets index 3f17efb8..41fed939 100644 --- a/csharp/Xamarin.iOS/CustomBuildAction.targets +++ b/csharp/Xamarin.iOS/CustomBuildAction.targets @@ -4,7 +4,7 @@ CopyInNativeLib;$(CompileDependsOn) - - + + \ No newline at end of file