From dba3bf30b1c9e66096427e22f58f6d2a4a261e8d Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 16 Jul 2021 18:24:50 +0200 Subject: [PATCH] [AppKit/UIKit] Share the implementation of some classes between AppKit and UIKit. (#12131) * [src] Share [I]NSCollectionLayoutVisibleItem implementation between AppKit and UIKit. * [src] Share several NSLayout* implementations between AppKit and UIKit. --- src/Foundation/NSLayoutConstraint.cs | 21 ++ src/UIKit/NSLayoutConstraint.cs | 39 --- src/appkit.cs | 226 -------------- src/frameworks.sources | 1 - src/uikit.cs | 225 ------------- src/xkit.cs | 365 ++++++++++++++++++++++ tests/xtro-sharpie/MacCatalyst-UIKit.todo | 2 - tests/xtro-sharpie/iOS-UIKit.ignore | 2 - tests/xtro-sharpie/macOS-AppKit.ignore | 2 - tests/xtro-sharpie/tvOS-UIKit.ignore | 2 - 10 files changed, 386 insertions(+), 499 deletions(-) delete mode 100644 src/UIKit/NSLayoutConstraint.cs diff --git a/src/Foundation/NSLayoutConstraint.cs b/src/Foundation/NSLayoutConstraint.cs index 6b122de181..a79e7f619c 100644 --- a/src/Foundation/NSLayoutConstraint.cs +++ b/src/Foundation/NSLayoutConstraint.cs @@ -109,6 +109,27 @@ namespace UIKit { return NSLayoutConstraint.Create (view1, attribute1, relation, null, NSLayoutAttribute.NoAttribute, 1.0f, 0f); } + + // This solves the duplicate selector export problem while not breaking the API. + public static NSLayoutConstraint Create (NSObject view1, NSLayoutAttribute attribute1, NSLayoutRelation relation, + NSObject view2, NSLayoutAttribute attribute2, nfloat multiplier, nfloat constant) + { + return Create ((INativeObject) view1, attribute1, relation, view2, attribute2, multiplier, constant); + } + +#if !MONOMAC || XAMCORE_4_0 + [iOS (10, 0)] + public NSLayoutAnchor FirstAnchor () where AnchorType : NSObject + { + return Runtime.GetNSObject> (_FirstAnchor ()); + } + + [iOS (10, 0)] + public NSLayoutAnchor SecondAnchor () where AnchorType : NSObject + { + return Runtime.GetNSObject> (_SecondAnchor ()); + } +#endif // !MONOMAC || XAMCORE_4_0 } } diff --git a/src/UIKit/NSLayoutConstraint.cs b/src/UIKit/NSLayoutConstraint.cs deleted file mode 100644 index 2197ce33e3..0000000000 --- a/src/UIKit/NSLayoutConstraint.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// NSLayoutConstraint.cs: -// -// Authors: -// Paola Villarreal -// -// Copyright 2015, Xamarin Inc -// - -#if !WATCH - -using System; -using Foundation; -using ObjCRuntime; - -namespace UIKit { - partial class NSLayoutConstraint { - // This solves the duplicate selector export problem while not breaking the API. - public static NSLayoutConstraint Create (NSObject view1, NSLayoutAttribute attribute1, NSLayoutRelation relation, - NSObject view2, NSLayoutAttribute attribute2, nfloat multiplier, nfloat constant) - { - return Create ((INativeObject) view1, attribute1, relation, view2, attribute2, multiplier, constant); - } - - [iOS (10, 0)] - public NSLayoutAnchor FirstAnchor () where AnchorType : NSObject - { - return Runtime.GetNSObject> (_FirstAnchor ()); - } - - [iOS (10, 0)] - public NSLayoutAnchor SecondAnchor () where AnchorType : NSObject - { - return Runtime.GetNSObject> (_SecondAnchor ()); - } - } -} - -#endif // !WATCH diff --git a/src/appkit.cs b/src/appkit.cs index 439c470052..d168e24339 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -10541,185 +10541,6 @@ namespace AppKit { } #endif - [Mac (10,11)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] // Handle is nil - interface NSLayoutAnchor : NSCoding, NSCopying - { - [Export ("constraintEqualToAnchor:")] - NSLayoutConstraint ConstraintEqualToAnchor (NSLayoutAnchor anchor); - - [Export ("constraintGreaterThanOrEqualToAnchor:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToAnchor (NSLayoutAnchor anchor); - - [Export ("constraintLessThanOrEqualToAnchor:")] - NSLayoutConstraint ConstraintLessThanOrEqualToAnchor (NSLayoutAnchor anchor); - - // -(NSLayoutConstraint *)constraintEqualToAnchor:(NSLayoutAnchor *)anchor constant:(CGFloat)c; - [Export ("constraintEqualToAnchor:constant:")] - NSLayoutConstraint ConstraintEqualToAnchor (NSLayoutAnchor anchor, nfloat constant); - - [Export ("constraintGreaterThanOrEqualToAnchor:constant:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToAnchor (NSLayoutAnchor anchor, nfloat constant); - - [Export ("constraintLessThanOrEqualToAnchor:constant:")] - NSLayoutConstraint ConstraintLessThanOrEqualToAnchor (NSLayoutAnchor anchor, nfloat constant); - - [Mac (10, 12)] - [Export ("name")] - string Name { get; } - - [Mac (10, 12)] - [NullAllowed, Export ("item", ArgumentSemantic.Weak)] - NSObject Item { get; } - - [Mac (10, 12)] - [Export ("hasAmbiguousLayout")] - bool HasAmbiguousLayout { get; } - - [Mac (10, 12)] - [Export ("constraintsAffectingLayout")] - NSLayoutConstraint[] ConstraintsAffectingLayout { get; } - } - - [Mac (10,11)] - [BaseType (typeof(NSLayoutAnchor))] - [DisableDefaultCtor] // Handle is nil - interface NSLayoutXAxisAnchor - { - [Mac (10,12)] - [Export ("anchorWithOffsetToAnchor:")] - NSLayoutDimension GetAnchorWithOffset (NSLayoutXAxisAnchor otherAnchor); - - [Mac (11,0)] - [Export ("constraintEqualToSystemSpacingAfterAnchor:multiplier:")] - NSLayoutConstraint ConstraintEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); - - [Mac (11,0)] - [Export ("constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); - - [Mac (11,0)] - [Export ("constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] - NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); - } - - [Mac (10,11)] - [BaseType (typeof(NSLayoutAnchor))] - [DisableDefaultCtor] // Handle is nil - interface NSLayoutYAxisAnchor - { - [Mac (10,12)] - [Export ("anchorWithOffsetToAnchor:")] - NSLayoutDimension GetAnchorWithOffset (NSLayoutYAxisAnchor otherAnchor); - - [Mac (11,0)] - [Export ("constraintEqualToSystemSpacingBelowAnchor:multiplier:")] - NSLayoutConstraint ConstraintEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); - - [Mac (11,0)] - [Export ("constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); - - [Mac (11,0)] - [Export ("constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] - NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); - } - - [Mac (10,11)] - [BaseType (typeof(NSLayoutAnchor))] - [DisableDefaultCtor] // Handle is nil - interface NSLayoutDimension - { - [Export ("constraintEqualToConstant:")] - NSLayoutConstraint ConstraintEqualToConstant (nfloat constant); - - [Export ("constraintGreaterThanOrEqualToConstant:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToConstant (nfloat constant); - - [Export ("constraintLessThanOrEqualToConstant:")] - NSLayoutConstraint ConstraintLessThanOrEqualToConstant (nfloat constant); - - [Export ("constraintEqualToAnchor:multiplier:")] - NSLayoutConstraint ConstraintEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier); - - [Export ("constraintGreaterThanOrEqualToAnchor:multiplier:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier); - - [Export ("constraintLessThanOrEqualToAnchor:multiplier:")] - NSLayoutConstraint ConstraintLessThanOrEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier); - - [Export ("constraintEqualToAnchor:multiplier:constant:")] - NSLayoutConstraint ConstraintEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); - - [Export ("constraintGreaterThanOrEqualToAnchor:multiplier:constant:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); - - [Export ("constraintLessThanOrEqualToAnchor:multiplier:constant:")] - NSLayoutConstraint ConstraintLessThanOrEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); - } - - [BaseType (typeof (NSObject))] - interface NSLayoutConstraint : NSAnimatablePropertyContainer { - [Static] - [Export ("constraintsWithVisualFormat:options:metrics:views:")] - NSLayoutConstraint [] FromVisualFormat (string format, NSLayoutFormatOptions formatOptions, [NullAllowed] NSDictionary metrics, NSDictionary views); - - [Static] - [Export ("constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:")] - NSLayoutConstraint Create (NSObject view1, NSLayoutAttribute attribute1, NSLayoutRelation relation, [NullAllowed] NSObject view2, NSLayoutAttribute attribute2, nfloat multiplier, nfloat constant); - - [Export ("priority")] - float Priority { get; set; } /* NSLayoutPriority = float */ - - [Export ("shouldBeArchived")] - bool ShouldBeArchived { get; set; } - - [Export ("firstItem", ArgumentSemantic.Assign)] - NSObject FirstItem { get; } - - [Export ("firstAttribute")] - NSLayoutAttribute FirstAttribute { get; } - - [Export ("relation")] - NSLayoutRelation Relation { get; } - - [Export ("secondItem", ArgumentSemantic.Assign)] - NSObject SecondItem { get; } - - [Export ("secondAttribute")] - NSLayoutAttribute SecondAttribute { get; } - - [Export ("multiplier")] - nfloat Multiplier { get; } - - [Export ("constant")] - nfloat Constant { get; set; } - - [Mac (10,10)] - [Export ("active")] - bool Active { [Bind ("isActive")] get; set; } - - [Mac (10,10)] - [Static, Export ("activateConstraints:")] - void ActivateConstraints (NSLayoutConstraint [] constraints); - - [Mac (10,10)] - [Static, Export ("deactivateConstraints:")] - void DeactivateConstraints (NSLayoutConstraint [] constraints); - - [Mac (10, 12)] - [Export ("firstAnchor", ArgumentSemantic.Copy)] - NSLayoutAnchor FirstAnchor { get; } - - [Mac (10, 12)] - [NullAllowed, Export ("secondAnchor", ArgumentSemantic.Copy)] - NSLayoutAnchor SecondAnchor { get; } - - [NullAllowed, Export ("identifier")] - string Identifier { get; set; } - } - [Mac (10,11)] [BaseType (typeof(NSObject))] interface NSLayoutGuide : NSCoding, NSUserInterfaceItemIdentification @@ -27213,53 +27034,6 @@ namespace AppKit { bool ShowsIndicator { get; set; } } - [Mac (10,15)] - [Protocol] - interface NSCollectionLayoutVisibleItem - { - [Abstract] - [Export ("alpha")] - nfloat Alpha { get; set; } - - [Abstract] - [Export ("zIndex")] - nint ZIndex { get; set; } - - [Abstract] - [Export ("hidden")] - bool Hidden { [Bind ("isHidden")] get; set; } - - [Abstract] - [Export ("center", ArgumentSemantic.Assign)] - CGPoint Center { get; set; } - - [Abstract] - [Export ("name")] - string Name { get; } - - [Abstract] - [Export ("indexPath")] - NSIndexPath IndexPath { get; } - - [Abstract] - [Export ("frame")] - CGRect Frame { get; } - - [Abstract] - [Export ("bounds")] - CGRect Bounds { get; } - - [Abstract] - [Export ("representedElementCategory")] - NSCollectionElementCategory RepresentedElementCategory { get; } - - [Abstract] - [NullAllowed, Export ("representedElementKind")] - string RepresentedElementKind { get; } - } - - interface INSCollectionLayoutVisibleItem { } - delegate NSCollectionLayoutSection NSCollectionViewCompositionalLayoutSectionProvider (nint section, INSCollectionLayoutEnvironment layout); [Mac (10,15)] diff --git a/src/frameworks.sources b/src/frameworks.sources index a0a8370e5f..231eea5549 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1618,7 +1618,6 @@ UIKIT_CORE_SOURCES = \ UIKIT_SOURCES = \ UIKit/Compat.cs \ - UIKit/NSLayoutConstraint.cs \ UIKit/NSLayoutManager.cs \ AppKit/NSLayoutManager.cs \ UIKit/UIAccessibility.cs \ diff --git a/src/uikit.cs b/src/uikit.cs index 38c5b83f25..d0f3c22721 100644 --- a/src/uikit.cs +++ b/src/uikit.cs @@ -359,174 +359,6 @@ namespace UIKit { } #if !WATCH - [NoWatch] - [iOS (9,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] // Handle is nil - interface NSLayoutAnchor : NSCopying, NSCoding - { - [Export ("constraintEqualToAnchor:")] - NSLayoutConstraint ConstraintEqualTo (NSLayoutAnchor anchor); - - [Export ("constraintGreaterThanOrEqualToAnchor:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualTo (NSLayoutAnchor anchor); - - [Export ("constraintLessThanOrEqualToAnchor:")] - NSLayoutConstraint ConstraintLessThanOrEqualTo (NSLayoutAnchor anchor); - - [Export ("constraintEqualToAnchor:constant:")] - NSLayoutConstraint ConstraintEqualTo (NSLayoutAnchor anchor, nfloat constant); - - [Export ("constraintGreaterThanOrEqualToAnchor:constant:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualTo (NSLayoutAnchor anchor, nfloat constant); - - [Export ("constraintLessThanOrEqualToAnchor:constant:")] - NSLayoutConstraint ConstraintLessThanOrEqualTo (NSLayoutAnchor anchor, nfloat constant); - } - - [NoWatch] - [iOS (9,0)] - [TV (10,0)] - [BaseType (typeof(NSLayoutAnchor))] - [DisableDefaultCtor] // Handle is nil - interface NSLayoutXAxisAnchor - { - [iOS (10,0)] - [Export ("anchorWithOffsetToAnchor:")] - NSLayoutDimension CreateAnchorWithOffset (NSLayoutXAxisAnchor otherAnchor); - - [TV (11,0), iOS (11,0)] - [Export ("constraintEqualToSystemSpacingAfterAnchor:multiplier:")] - NSLayoutConstraint ConstraintEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); - - [TV (11,0), iOS (11,0)] - [Export ("constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); - - [TV (11,0), iOS (11,0)] - [Export ("constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] - NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); - } - - [NoWatch] - [iOS (9,0)] - [TV (10,0)] - [BaseType (typeof(NSLayoutAnchor))] - [DisableDefaultCtor] // Handle is nil - interface NSLayoutYAxisAnchor - { - [iOS (10,0)] - [Export ("anchorWithOffsetToAnchor:")] - NSLayoutDimension CreateAnchorWithOffset (NSLayoutYAxisAnchor otherAnchor); - - [TV (11,0), iOS (11,0)] - [Export ("constraintEqualToSystemSpacingBelowAnchor:multiplier:")] - NSLayoutConstraint ConstraintEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); - - [TV (11,0), iOS (11,0)] - [Export ("constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); - - [TV (11,0), iOS (11,0)] - [Export ("constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] - NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); - } - - [NoWatch] - [iOS (9,0)] - [BaseType (typeof(NSLayoutAnchor))] - [DisableDefaultCtor] // Handle is nil - interface NSLayoutDimension - { - [Export ("constraintEqualToConstant:")] - NSLayoutConstraint ConstraintEqualTo (nfloat constant); - - [Export ("constraintGreaterThanOrEqualToConstant:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualTo (nfloat constant); - - [Export ("constraintLessThanOrEqualToConstant:")] - NSLayoutConstraint ConstraintLessThanOrEqualTo (nfloat constant); - - [Export ("constraintEqualToAnchor:multiplier:")] - NSLayoutConstraint ConstraintEqualTo (NSLayoutDimension anchor, nfloat multiplier); - - [Export ("constraintGreaterThanOrEqualToAnchor:multiplier:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualTo (NSLayoutDimension anchor, nfloat multiplier); - - [Export ("constraintLessThanOrEqualToAnchor:multiplier:")] - NSLayoutConstraint ConstraintLessThanOrEqualTo (NSLayoutDimension anchor, nfloat multiplier); - - [Export ("constraintEqualToAnchor:multiplier:constant:")] - NSLayoutConstraint ConstraintEqualTo (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); - - [Export ("constraintGreaterThanOrEqualToAnchor:multiplier:constant:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualTo (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); - - [Export ("constraintLessThanOrEqualToAnchor:multiplier:constant:")] - NSLayoutConstraint ConstraintLessThanOrEqualTo (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); - } - - [NoWatch] - [BaseType (typeof (NSObject))] - interface NSLayoutConstraint { - [Static] - [Export ("constraintsWithVisualFormat:options:metrics:views:")] - NSLayoutConstraint [] FromVisualFormat (string format, NSLayoutFormatOptions formatOptions, [NullAllowed] NSDictionary metrics, NSDictionary views); - - [Static] - [Export ("constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:")] - NSLayoutConstraint Create (INativeObject view1, NSLayoutAttribute attribute1, NSLayoutRelation relation, [NullAllowed] INativeObject view2, NSLayoutAttribute attribute2, nfloat multiplier, nfloat constant); - - [Export ("priority")] - float Priority { get; set; } // Returns a float, not nfloat. - - [Export ("shouldBeArchived")] - bool ShouldBeArchived { get; set; } - - [NullAllowed, Export ("firstItem", ArgumentSemantic.Assign)] - NSObject FirstItem { get; } - - [Export ("firstAttribute")] - NSLayoutAttribute FirstAttribute { get; } - - [Export ("relation")] - NSLayoutRelation Relation { get; } - - [Export ("secondItem", ArgumentSemantic.Assign)] - NSObject SecondItem { get; } - - [Export ("secondAttribute")] - NSLayoutAttribute SecondAttribute { get; } - - [Export ("multiplier")] - nfloat Multiplier { get; } - - [Export ("constant")] - nfloat Constant { get; set; } - - [iOS (8,0)] - [Export ("active")] - bool Active { [Bind ("isActive")] get; set; } - - [iOS (8,0)] - [Static, Export ("activateConstraints:")] - void ActivateConstraints (NSLayoutConstraint [] constraints); - - [iOS (8,0)] - [Static, Export ("deactivateConstraints:")] - void DeactivateConstraints (NSLayoutConstraint [] constraints); - - [iOS (10,0), TV (10,0)] - [Export ("firstAnchor", ArgumentSemantic.Copy)] - [Internal] - IntPtr _FirstAnchor (); - - [iOS (10,0), TV (10,0)] - [Export ("secondAnchor", ArgumentSemantic.Copy)] - [Internal] - IntPtr _SecondAnchor (); - } - [NoWatch] [iOS (7,0)] // Yup, it is declared as appearing in 7.0, even if it shipped with 8.0 [Category, BaseType(typeof(NSLayoutConstraint))] @@ -20437,63 +20269,6 @@ namespace UIKit { bool IsFractionalOffset { get; } } - interface INSCollectionLayoutVisibleItem { } - - [NoWatch, TV (13,0), iOS (13,0)] - [Protocol] - interface NSCollectionLayoutVisibleItem : UIDynamicItem { - - [Abstract] - [Export ("alpha")] - nfloat Alpha { get; set; } - - [Abstract] - [Export ("zIndex")] - nint ZIndex { get; set; } - - [Abstract] - [Export ("hidden")] - bool Hidden { [Bind ("isHidden")] get; set; } - - // Inherited from UIDynamicItem - // [Abstract] - // [Export ("center", ArgumentSemantic.Assign)] - // CGPoint Center { get; set; } - - // [Abstract] - // [Export ("transform", ArgumentSemantic.Assign)] - // CGAffineTransform Transform { get; set; } - - [Abstract] - [Export ("transform3D", ArgumentSemantic.Assign)] - CATransform3D Transform3D { get; set; } - - [Abstract] - [Export ("name")] - string Name { get; } - - [Abstract] - [Export ("indexPath")] - NSIndexPath IndexPath { get; } - - [Abstract] - [Export ("frame")] - CGRect Frame { get; } - - // Inherited from UIDynamicItem - // [Abstract] - // [Export ("bounds")] - // CGRect Bounds { get; } - - [Abstract] - [Export ("representedElementCategory")] - UICollectionElementCategory RepresentedElementCategory { get; } - - [Abstract] - [NullAllowed, Export ("representedElementKind")] - string RepresentedElementKind { get; } - } - [NoWatch, TV (13,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] diff --git a/src/xkit.cs b/src/xkit.cs index 323dabb5f3..d0bdc580ac 100644 --- a/src/xkit.cs +++ b/src/xkit.cs @@ -5,6 +5,9 @@ using System.Diagnostics; using System.ComponentModel; using Foundation; using ObjCRuntime; +#if !WATCH +using CoreAnimation; +#endif using CoreGraphics; using CGGlyph=System.UInt16; @@ -33,8 +36,10 @@ using NSTypesetterBehavior=System.Object; using NSView=System.Object; using NSWindow=System.Object; #if WATCH +using CATransform3D=System.Object; using NSTextContainer=System.Object; using NSTextStorage=System.Object; +using UIDynamicItem=System.Object; using UITraitCollection = Foundation.NSObject; #endif // WATCH #else @@ -47,10 +52,12 @@ using UITraitCollection=System.Object; using TextAlignment=AppKit.NSTextAlignment; using LineBreakMode=AppKit.NSLineBreakMode; using CollectionLayoutSectionOrthogonalScrollingBehavior=AppKit.NSCollectionLayoutSectionOrthogonalScrollingBehavior; +using CollectionElementCategory=AppKit.NSCollectionElementCategory; #else using TextAlignment=UIKit.UITextAlignment; using LineBreakMode=UIKit.UILineBreakMode; using CollectionLayoutSectionOrthogonalScrollingBehavior=UIKit.UICollectionLayoutSectionOrthogonalScrollingBehavior; +using CollectionElementCategory=UIKit.UICollectionElementCategory; #endif #if MONOMAC @@ -1725,4 +1732,362 @@ namespace UIKit { [Export ("traitCollection")] UITraitCollection TraitCollection { get; } } + + interface INSCollectionLayoutVisibleItem { } + + [NoWatch, TV (13,0), iOS (13,0)] + [Mac (10,15)] + [MacCatalyst (13,0)] + [Protocol] + interface NSCollectionLayoutVisibleItem +#if !MONOMAC && !WATCH + : UIDynamicItem +#endif + { + + [Abstract] + [Export ("alpha")] + nfloat Alpha { get; set; } + + [Abstract] + [Export ("zIndex")] + nint ZIndex { get; set; } + + [Abstract] + [Export ("hidden")] + bool Hidden { [Bind ("isHidden")] get; set; } + +#if MONOMAC + // Inherited from UIDynamicItem for !MONOMAC + [Abstract] + [Export ("center", ArgumentSemantic.Assign)] + CGPoint Center { get; set; } + + + [Abstract] + [Export ("bounds")] + CGRect Bounds { get; } +#endif + + [NoMac] + [Abstract] + [Export ("transform3D", ArgumentSemantic.Assign)] + CATransform3D Transform3D { get; set; } + + [Abstract] + [Export ("name")] + string Name { get; } + + [Abstract] + [Export ("indexPath")] + NSIndexPath IndexPath { get; } + + [Abstract] + [Export ("frame")] + CGRect Frame { get; } + + [Abstract] + [Export ("representedElementCategory")] + CollectionElementCategory RepresentedElementCategory { + get; + } + + [Abstract] + [NullAllowed, Export ("representedElementKind")] + string RepresentedElementKind { get; } + } + + [NoWatch] + [iOS (9,0)] + [Mac (10,11)] + [MacCatalyst (13,0)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] // Handle is nil + interface NSLayoutAnchor : NSCopying, NSCoding + { + [Export ("constraintEqualToAnchor:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintEqualToAnchor (NSLayoutAnchor anchor); +#else + NSLayoutConstraint ConstraintEqualTo (NSLayoutAnchor anchor); +#endif + + [Export ("constraintGreaterThanOrEqualToAnchor:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintGreaterThanOrEqualToAnchor (NSLayoutAnchor anchor); +#else + NSLayoutConstraint ConstraintGreaterThanOrEqualTo (NSLayoutAnchor anchor); +#endif + + [Export ("constraintLessThanOrEqualToAnchor:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintLessThanOrEqualToAnchor (NSLayoutAnchor anchor); +#else + NSLayoutConstraint ConstraintLessThanOrEqualTo (NSLayoutAnchor anchor); +#endif + + [Export ("constraintEqualToAnchor:constant:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintEqualToAnchor (NSLayoutAnchor anchor, nfloat constant); +#else + NSLayoutConstraint ConstraintEqualTo (NSLayoutAnchor anchor, nfloat constant); +#endif + + [Export ("constraintGreaterThanOrEqualToAnchor:constant:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintGreaterThanOrEqualToAnchor (NSLayoutAnchor anchor, nfloat constant); +#else + NSLayoutConstraint ConstraintGreaterThanOrEqualTo (NSLayoutAnchor anchor, nfloat constant); +#endif + + [Export ("constraintLessThanOrEqualToAnchor:constant:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintLessThanOrEqualToAnchor (NSLayoutAnchor anchor, nfloat constant); +#else + NSLayoutConstraint ConstraintLessThanOrEqualTo (NSLayoutAnchor anchor, nfloat constant); +#endif + + [NoiOS][NoMacCatalyst][NoTV][NoWatch] + [Mac (10, 12)] + [Export ("name")] + string Name { get; } + + [NoiOS][NoMacCatalyst][NoTV][NoWatch] + [Mac (10, 12)] + [NullAllowed, Export ("item", ArgumentSemantic.Weak)] + NSObject Item { get; } + + [NoiOS][NoMacCatalyst][NoTV][NoWatch] + [Mac (10, 12)] + [Export ("hasAmbiguousLayout")] + bool HasAmbiguousLayout { get; } + + [NoiOS][NoMacCatalyst][NoTV][NoWatch] + [Mac (10, 12)] + [Export ("constraintsAffectingLayout")] + NSLayoutConstraint[] ConstraintsAffectingLayout { get; } + } + + [NoWatch] + [iOS (9,0)] + [TV (10,0)] + [Mac (10,11)] + [MacCatalyst (13,0)] + [BaseType (typeof(NSLayoutAnchor))] + [DisableDefaultCtor] // Handle is nil + interface NSLayoutXAxisAnchor + { + [iOS (10,0)] + [Mac (10,12)] + [Export ("anchorWithOffsetToAnchor:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutDimension GetAnchorWithOffset (NSLayoutXAxisAnchor otherAnchor); +#else + NSLayoutDimension CreateAnchorWithOffset (NSLayoutXAxisAnchor otherAnchor); +#endif + + [TV (11,0), iOS (11,0)] + [Mac (11,0)] + [Export ("constraintEqualToSystemSpacingAfterAnchor:multiplier:")] + NSLayoutConstraint ConstraintEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); + + [TV (11,0), iOS (11,0)] + [Mac (11,0)] + [Export ("constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] + NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); + + [TV (11,0), iOS (11,0)] + [Mac (11,0)] + [Export ("constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] + NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); + } + + [NoWatch] + [iOS (9,0)] + [TV (10,0)] + [Mac (10,11)] + [MacCatalyst (13,0)] + [BaseType (typeof(NSLayoutAnchor))] + [DisableDefaultCtor] // Handle is nil + interface NSLayoutYAxisAnchor + { + [iOS (10,0)] + [Mac (10,12)] + [Export ("anchorWithOffsetToAnchor:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutDimension GetAnchorWithOffset (NSLayoutYAxisAnchor otherAnchor); +#else + NSLayoutDimension CreateAnchorWithOffset (NSLayoutYAxisAnchor otherAnchor); +#endif + + [TV (11,0), iOS (11,0)] + [Mac (11,0)] + [Export ("constraintEqualToSystemSpacingBelowAnchor:multiplier:")] + NSLayoutConstraint ConstraintEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); + + [TV (11,0), iOS (11,0)] + [Mac (11,0)] + [Export ("constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] + NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); + + [TV (11,0), iOS (11,0)] + [Mac (11,0)] + [Export ("constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] + NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); + } + + [NoWatch] + [iOS (9,0)] + [Mac (10,11)] + [BaseType (typeof(NSLayoutAnchor))] + [DisableDefaultCtor] // Handle is nil + interface NSLayoutDimension + { + [Export ("constraintEqualToConstant:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintEqualToConstant (nfloat constant); +#else + NSLayoutConstraint ConstraintEqualTo (nfloat constant); +#endif + + [Export ("constraintGreaterThanOrEqualToConstant:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintGreaterThanOrEqualToConstant (nfloat constant); +#else + NSLayoutConstraint ConstraintGreaterThanOrEqualTo (nfloat constant); +#endif + + [Export ("constraintLessThanOrEqualToConstant:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintLessThanOrEqualToConstant (nfloat constant); +#else + NSLayoutConstraint ConstraintLessThanOrEqualTo (nfloat constant); +#endif + + [Export ("constraintEqualToAnchor:multiplier:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier); +#else + NSLayoutConstraint ConstraintEqualTo (NSLayoutDimension anchor, nfloat multiplier); +#endif + + [Export ("constraintGreaterThanOrEqualToAnchor:multiplier:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintGreaterThanOrEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier); +#else + NSLayoutConstraint ConstraintGreaterThanOrEqualTo (NSLayoutDimension anchor, nfloat multiplier); +#endif + + [Export ("constraintLessThanOrEqualToAnchor:multiplier:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintLessThanOrEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier); +#else + NSLayoutConstraint ConstraintLessThanOrEqualTo (NSLayoutDimension anchor, nfloat multiplier); +#endif + + [Export ("constraintEqualToAnchor:multiplier:constant:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); +#else + NSLayoutConstraint ConstraintEqualTo (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); +#endif + + [Export ("constraintGreaterThanOrEqualToAnchor:multiplier:constant:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintGreaterThanOrEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); +#else + NSLayoutConstraint ConstraintGreaterThanOrEqualTo (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); +#endif + + [Export ("constraintLessThanOrEqualToAnchor:multiplier:constant:")] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutConstraint ConstraintLessThanOrEqualToAnchor (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); +#else + NSLayoutConstraint ConstraintLessThanOrEqualTo (NSLayoutDimension anchor, nfloat multiplier, nfloat constant); +#endif + } + + [NoWatch] + [MacCatalyst (13,0)] + [BaseType (typeof (NSObject))] + interface NSLayoutConstraint +#if MONOMAC + : NSAnimatablePropertyContainer +#endif +{ + [Static] + [Export ("constraintsWithVisualFormat:options:metrics:views:")] + NSLayoutConstraint [] FromVisualFormat (string format, NSLayoutFormatOptions formatOptions, [NullAllowed] NSDictionary metrics, NSDictionary views); + + [Static] + [Export ("constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:")] + NSLayoutConstraint Create (INativeObject view1, NSLayoutAttribute attribute1, NSLayoutRelation relation, [NullAllowed] INativeObject view2, NSLayoutAttribute attribute2, nfloat multiplier, nfloat constant); + + [Export ("priority")] + float Priority { get; set; } // Returns a float, not nfloat. + + [Export ("shouldBeArchived")] + bool ShouldBeArchived { get; set; } + + [NullAllowed, Export ("firstItem", ArgumentSemantic.Assign)] + NSObject FirstItem { get; } + + [Export ("firstAttribute")] + NSLayoutAttribute FirstAttribute { get; } + + [Export ("relation")] + NSLayoutRelation Relation { get; } + + [Export ("secondItem", ArgumentSemantic.Assign)] + [NullAllowed] + NSObject SecondItem { get; } + + [Export ("secondAttribute")] + NSLayoutAttribute SecondAttribute { get; } + + [Export ("multiplier")] + nfloat Multiplier { get; } + + [Export ("constant")] + nfloat Constant { get; set; } + + [iOS (8,0)] + [Mac (10,10)] + [Export ("active")] + bool Active { [Bind ("isActive")] get; set; } + + [iOS (8,0)] + [Mac (10,10)] + [Static, Export ("activateConstraints:")] + void ActivateConstraints (NSLayoutConstraint [] constraints); + + [iOS (8,0)] + [Mac (10,10)] + [Static, Export ("deactivateConstraints:")] + void DeactivateConstraints (NSLayoutConstraint [] constraints); + + [Mac (10, 12)] + [iOS (10,0), TV (10,0)] + [Export ("firstAnchor", ArgumentSemantic.Copy)] +#if MONOMAC && !XAMCORE_4_0 + NSLayoutAnchor FirstAnchor { get; } +#else + [Internal] + IntPtr _FirstAnchor (); +#endif + + [Mac (10, 12)] + [iOS (10,0), TV (10,0)] + [Export ("secondAnchor", ArgumentSemantic.Copy)] +#if MONOMAC && !XAMCORE_4_0 + [NullAllowed] + NSLayoutAnchor SecondAnchor { get; } +#else + [Internal] + IntPtr _SecondAnchor (); +#endif + + [NullAllowed, Export ("identifier")] + string Identifier { get; set; } + } } diff --git a/tests/xtro-sharpie/MacCatalyst-UIKit.todo b/tests/xtro-sharpie/MacCatalyst-UIKit.todo index 48ea07252b..6117026799 100644 --- a/tests/xtro-sharpie/MacCatalyst-UIKit.todo +++ b/tests/xtro-sharpie/MacCatalyst-UIKit.todo @@ -98,7 +98,6 @@ !missing-null-allowed! 'Foundation.NSIndexPath[] UIKit.UITableView::get_IndexPathsForSelectedRows()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSIndexSet UIKit.UIPasteboard::ItemSetWithPasteboardTypes(System.String[])' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSNumber[] UIKit.UIImagePickerController::AvailableCaptureModesForCameraDevice(UIKit.UIImagePickerControllerCameraDevice)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.NSLayoutConstraint::get_SecondItem()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIActivityItemProvider::get_PlaceholderItem()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIActivityItemSource::GetItemForActivity(UIKit.UIActivityViewController,Foundation.NSString)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIDocument::ContentsForType(System.String,Foundation.NSError&)' is missing an [NullAllowed] on return type @@ -144,7 +143,6 @@ !missing-null-allowed! 'System.nint UIKit.UIActionSheet::AddButton(System.String)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.nint UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.nint UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'System.String UIKit.NSIdentifier::GetIdentifier(UIKit.NSLayoutConstraint)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String UIKit.UIActionSheet::ButtonTitle(System.nint)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String UIKit.UIActivity::get_Title()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String UIKit.UIAlertAction::get_Title()' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/iOS-UIKit.ignore b/tests/xtro-sharpie/iOS-UIKit.ignore index ed5d0d55ca..a95e848997 100644 --- a/tests/xtro-sharpie/iOS-UIKit.ignore +++ b/tests/xtro-sharpie/iOS-UIKit.ignore @@ -167,7 +167,6 @@ !missing-null-allowed! 'Foundation.NSIndexPath[] UIKit.UITableView::get_IndexPathsForSelectedRows()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSIndexSet UIKit.UIPasteboard::ItemSetWithPasteboardTypes(System.String[])' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSNumber[] UIKit.UIImagePickerController::AvailableCaptureModesForCameraDevice(UIKit.UIImagePickerControllerCameraDevice)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.NSLayoutConstraint::get_SecondItem()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIActivityItemProvider::get_PlaceholderItem()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIActivityItemSource::GetItemForActivity(UIKit.UIActivityViewController,Foundation.NSString)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIDocument::ContentsForType(System.String,Foundation.NSError&)' is missing an [NullAllowed] on return type @@ -215,7 +214,6 @@ !missing-null-allowed! 'System.nint UIKit.UIActionSheet::AddButton(System.String)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.nint UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.nint UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'System.String UIKit.NSIdentifier::GetIdentifier(UIKit.NSLayoutConstraint)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String UIKit.UIActionSheet::ButtonTitle(System.nint)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String UIKit.UIActivity::get_Title()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String UIKit.UIAlertAction::get_Title()' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/macOS-AppKit.ignore b/tests/xtro-sharpie/macOS-AppKit.ignore index 4843f577ee..9c2bb2758d 100644 --- a/tests/xtro-sharpie/macOS-AppKit.ignore +++ b/tests/xtro-sharpie/macOS-AppKit.ignore @@ -1583,8 +1583,6 @@ !missing-null-allowed! 'Foundation.NSObject AppKit.NSEvent::AddGlobalMonitorForEventsMatchingMask(AppKit.NSEventMask,AppKit.GlobalEventHandler)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject AppKit.NSEvent::AddLocalMonitorForEventsMatchingMask(AppKit.NSEventMask,AppKit.LocalEventHandler)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject AppKit.NSFontDescriptor::ObjectForKey(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject AppKit.NSLayoutConstraint::get_FirstItem()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject AppKit.NSLayoutConstraint::get_SecondItem()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject AppKit.NSLayoutManager::GetTemporaryAttribute(Foundation.NSString,System.nuint,System.IntPtr)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject AppKit.NSLayoutManager::GetTemporaryAttribute(Foundation.NSString,System.nuint,System.IntPtr,Foundation.NSRange)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject AppKit.NSMatrix::SelectTextAtRowColumn(System.nint,System.nint)' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/tvOS-UIKit.ignore b/tests/xtro-sharpie/tvOS-UIKit.ignore index 2d42d0bf7c..c227e3f15b 100644 --- a/tests/xtro-sharpie/tvOS-UIKit.ignore +++ b/tests/xtro-sharpie/tvOS-UIKit.ignore @@ -170,7 +170,6 @@ !missing-null-allowed! 'Foundation.NSIndexPath[] UIKit.UICollectionView::GetIndexPathsForSelectedItems()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSIndexPath[] UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedItemIndexPaths()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSIndexPath[] UIKit.UITableView::get_IndexPathsForSelectedRows()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.NSLayoutConstraint::get_SecondItem()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIFontDescriptor::GetObject(Foundation.NSString)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIResponder::GetTargetForAction(ObjCRuntime.Selector,Foundation.NSObject)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject UIKit.UIStoryboardUnwindSegueSource::get_Sender()' is missing an [NullAllowed] on return type @@ -198,7 +197,6 @@ !missing-null-allowed! 'System.Double UIKit.UIViewControllerAnimatedTransitioning::TransitionDuration(UIKit.IUIViewControllerContextTransitioning)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.nint UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.nint UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'System.String UIKit.NSIdentifier::GetIdentifier(UIKit.NSLayoutConstraint)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String UIKit.UIAlertAction::get_Title()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String UIKit.UIButton::get_CurrentTitle()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String UIKit.UIButton::Title(UIKit.UIControlState)' is missing an [NullAllowed] on return type