diff --git a/src/Foundation/NSAttributedString.iOS.cs b/src/Foundation/NSAttributedString.iOS.cs index 28582b6dc3..6d4cbe7348 100644 --- a/src/Foundation/NSAttributedString.iOS.cs +++ b/src/Foundation/NSAttributedString.iOS.cs @@ -41,23 +41,6 @@ namespace Foundation { public partial class NSAttributedStringDocumentAttributes : DictionaryContainer { #if !MONOMAC && !COREBUILD - public CGSize? ViewSize { - get { - NSObject value; - Dictionary.TryGetValue (NSAttributedStringDocumentAttributeKey.NSViewSizeDocumentAttribute, out value); - var size = value as NSValue; - if (size != null) - return size.CGSizeValue; - return null; - } - set { - if (value is null) - RemoveValue (NSAttributedStringDocumentAttributeKey.NSViewSizeDocumentAttribute); - else - Dictionary [NSAttributedStringDocumentAttributeKey.NSViewSizeDocumentAttribute] = NSValue.FromCGSize (value.Value); - } - } - public float? ViewZoom { get { return GetFloatValue (NSAttributedStringDocumentAttributeKey.NSViewZoomDocumentAttribute); diff --git a/src/Foundation/NSAttributedStringDocumentAttributes.cs b/src/Foundation/NSAttributedStringDocumentAttributes.cs index a6378d6ca8..dbd26cb95f 100644 --- a/src/Foundation/NSAttributedStringDocumentAttributes.cs +++ b/src/Foundation/NSAttributedStringDocumentAttributes.cs @@ -157,6 +157,15 @@ namespace Foundation { } #endif // !__MACOS__ + public CGSize? ViewSize { + get { + return GetCGSizeValue (NSAttributedStringDocumentAttributeKey.NSViewSizeDocumentAttribute); + } + set { + SetCGSizeValue (NSAttributedStringDocumentAttributeKey.NSViewSizeDocumentAttribute, value); + } + } + #if !TVOS && !WATCH // documentation is unclear if an NSString or an NSUrl should be used... // but providing an `NSString` throws a `NSInvalidArgumentException Reason: (null) is not a file URL`