Suppress warning for CharacterRangeForGlyphRange is obsolete (#5613) fixes #5246
authorShane Neuville <shane94@hotmail.com>
Thu, 21 Mar 2019 11:12:18 +0000 (05:12 -0600)
committerRui Marinho <me@ruimarinho.net>
Thu, 21 Mar 2019 11:12:18 +0000 (11:12 +0000)
* switch to GetCharacterRange for spans

* suppress obsolete message

Xamarin.Forms.Platform.iOS/Extensions/LabelExtensions.cs

index 2ca314d..ab1f25f 100644 (file)
@@ -108,7 +108,9 @@ namespace Xamarin.Forms.Platform.MacOS
 #if __MOBILE__
                        layoutManager.CharacterRangeForGlyphRange(characterRange, ref glyphRange);
 #else
+#pragma warning disable CS0618 // Type or member is obsolete
                        layoutManager.CharacterRangeForGlyphRange(characterRange, out glyphRange);
+#pragma warning restore CS0618 // Type or member is obsolete
 #endif
                        return layoutManager.BoundingRectForGlyphRange(glyphRange, textContainer);
                }