[UIKit] Fix typo in UIGraphics EndPDFContent => EndPDFContext (#15381)
* [UIKit] Fix typo in UIGraphics EndPDFContent => EndPDFContext Fixes xamarin/xamarin-macios#15243 Fixes typo in UIGraphics EndPDFContent => EndPDFContext. Also added an error in XAMCORE 5.0 to review the usage of 'PDF' naming on this file not changing it right now to 'Pdf' for the typo fix so it does not look strange now compared to the other public methods. * Update src/UIKit/UIGraphics.cs Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com> Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com> Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
This commit is contained in:
Родитель
3fb77838b2
Коммит
e3a84d287d
|
@ -12,9 +12,14 @@ using CoreGraphics;
|
|||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace UIKit {
|
||||
|
||||
#if XAMCORE_5_0
|
||||
#error All PDF public name instances in this file need to be turned into Pdf. e.g. EndPDFContext into EndPdfContext.
|
||||
#endif
|
||||
|
||||
public static class UIGraphics {
|
||||
[DllImport (Constants.UIKitLibrary)]
|
||||
extern static IntPtr UIGraphicsGetCurrentContext ();
|
||||
|
@ -125,10 +130,16 @@ namespace UIKit {
|
|||
[DllImport (Constants.UIKitLibrary)]
|
||||
extern static void UIGraphicsEndPDFContext ();
|
||||
|
||||
public static void EndPDFContent () {
|
||||
public static void EndPDFContext () {
|
||||
UIGraphicsEndPDFContext ();
|
||||
}
|
||||
|
||||
#if !XAMCORE_5_0
|
||||
[EditorBrowsable (EditorBrowsableState.Never)]
|
||||
[Obsolete ("Use 'EndPDFContext' instead.")]
|
||||
public static void EndPDFContent () => EndPDFContext ();
|
||||
#endif
|
||||
|
||||
public static UIImage GetImageFromCurrentImageContext ()
|
||||
{
|
||||
using (var pool = new NSAutoreleasePool ()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче