diff options
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/NativeViewWrapperRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/NativeViewWrapperRenderer.cs | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/Xamarin.Forms.Platform.iOS/NativeViewWrapperRenderer.cs b/Xamarin.Forms.Platform.iOS/NativeViewWrapperRenderer.cs index cde9fe81..4d1252ee 100644 --- a/Xamarin.Forms.Platform.iOS/NativeViewWrapperRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/NativeViewWrapperRenderer.cs @@ -1,13 +1,8 @@ using CoreGraphics; -using Xamarin.Forms.Internals; -#if __MOBILE__ using UIKit; -namespace Xamarin.Forms.Platform.iOS -#else -using UIView = AppKit.NSView; +using Xamarin.Forms.Internals; -namespace Xamarin.Forms.Platform.MacOS -#endif +namespace Xamarin.Forms.Platform.iOS { public class NativeViewWrapperRenderer : ViewRenderer<NativeViewWrapper, UIView> { @@ -24,7 +19,6 @@ namespace Xamarin.Forms.Platform.MacOS return result ?? base.GetDesiredSize(widthConstraint, heightConstraint); } -#if __MOBILE__ public override void LayoutSubviews() { if (Element?.LayoutSubViews == null) @@ -56,26 +50,6 @@ namespace Xamarin.Forms.Platform.MacOS // if it returns null, fall back to the default implementation return result ?? base.SizeThatFits(size); } -#else - public override void Layout() - { - if (Element?.LayoutSubViews == null) - { - ((IVisualElementController)Element)?.InvalidateMeasure(InvalidationTrigger.MeasureChanged); - base.Layout(); - return; - } - - // The user has specified a different implementation of LayoutSubviews - var handled = Element.LayoutSubViews(); - - if (!handled) - { - // If the delegate wasn't able to handle the request, fall back to the default implementation - base.Layout(); - } - } -#endif protected override void OnElementChanged(ElementChangedEventArgs<NativeViewWrapper> e) { |