From a0b73b666311f6081e608eeeae90ab79f8b281a5 Mon Sep 17 00:00:00 2001 From: Alex Soto Date: Tue, 20 Aug 2019 21:55:08 -0400 Subject: [PATCH] [UIKit] Update bindings to Xcode 11 Beta 6 (#6807) * [UIKit] Update bindings to Xcode 11 Beta 6 * Update src/uikit.cs * Apply suggestions from code review * Update src/uikit.cs * Update src/uikit.cs * Update src/uikit.cs --- src/uikit.cs | 59 ++++++++++++++++------------- tests/xtro-sharpie/iOS-UIKit.ignore | 5 +++ tests/xtro-sharpie/iOS-UIKit.todo | 13 ------- 3 files changed, 38 insertions(+), 39 deletions(-) diff --git a/src/uikit.cs b/src/uikit.cs index 91415ce6ef..8bfcac1e2d 100644 --- a/src/uikit.cs +++ b/src/uikit.cs @@ -3284,14 +3284,14 @@ namespace UIKit { [return: NullAllowed] UITargetedPreview GetPreviewForDismissingMenu (UIContextMenuInteraction interaction, UIContextMenuConfiguration configuration); - [Export ("contextMenuInteraction:willCommitWithAnimator:")] - void WillCommit (UIContextMenuInteraction interaction, IUIContextMenuInteractionCommitAnimating animator); + [Export ("contextMenuInteraction:willPerformPreviewActionForMenuWithConfiguration:animator:")] + void WillPerformPreviewAction (UIContextMenuInteraction interaction, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); - [Export ("contextMenuInteractionWillPresent:")] - void WillPresent (UIContextMenuInteraction interaction); + [Export ("contextMenuInteraction:willDisplayMenuForConfiguration:animator:")] + void WillDisplayMenu (UIContextMenuInteraction interaction, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); - [Export ("contextMenuInteractionDidEnd:")] - void DidEnd (UIContextMenuInteraction interaction); + [Export ("contextMenuInteraction:willEndForConfiguration:animator:")] + void WillEnd (UIContextMenuInteraction interaction, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); } [NoWatch, NoTV, iOS (13,0)] @@ -3317,22 +3317,10 @@ namespace UIKit { [NoWatch, NoTV, iOS (13,0)] [Protocol] - interface UIContextMenuInteractionCommitAnimating { + interface UIContextMenuInteractionCommitAnimating : UIContextMenuInteractionAnimating { [Abstract] [Export ("preferredCommitStyle", ArgumentSemantic.Assign)] UIContextMenuInteractionCommitStyle PreferredCommitStyle { get; set; } - - [Abstract] - [NullAllowed, Export ("previewViewController")] - UIViewController PreviewViewController { get; } - - [Abstract] - [Export ("addAnimations:")] - void AddAnimations (Action animations); - - [Abstract] - [Export ("addCompletion:")] - void AddCompletion (Action completion); } interface IUICoordinateSpace {} @@ -4267,8 +4255,8 @@ namespace UIKit { UITargetedPreview GetPreviewForDismissingContextMenu (UICollectionView collectionView, UIContextMenuConfiguration configuration); [NoWatch, NoTV, iOS (13,0)] - [Export ("collectionView:willCommitMenuWithAnimator:")] - void WillCommitMenu (UICollectionView collectionView, IUIContextMenuInteractionCommitAnimating animator); + [Export ("collectionView:willPerformPreviewActionForMenuWithConfiguration:animator:")] + void WillPerformPreviewAction (UICollectionView collectionView, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); } [iOS (6,0)] @@ -12620,10 +12608,10 @@ namespace UIKit { UITargetedPreview GetPreviewForDismissingContextMenu (UITableView tableView, UIContextMenuConfiguration configuration); [NoWatch, NoTV, iOS (13,0)] - [Export ("tableView:willCommitMenuWithAnimator:")] - void WillCommitMenu (UITableView tableView, IUIContextMenuInteractionCommitAnimating animator); + [Export ("tableView:willPerformPreviewActionForMenuWithConfiguration:animator:")] + void WillPerformPreviewAction (UITableView tableView, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); - // WARNING: If you add more methods here, add them to UITableViewController as well. + // WARNING: If you add more methods here, add them to UITableViewControllerDelegate as well. } [BaseType (typeof (UIView))] @@ -13002,8 +12990,8 @@ namespace UIKit { UITargetedPreview GetPreviewForDismissingContextMenu (UITableView tableView, UIContextMenuConfiguration configuration); [NoWatch, NoTV, iOS (13,0)] - [Export ("tableView:willCommitMenuWithAnimator:")] - void WillCommitMenu (UITableView tableView, IUIContextMenuInteractionCommitAnimating animator); + [Export ("tableView:willPerformPreviewActionForMenuWithConfiguration:animator:")] + void WillPerformPreviewAction (UITableView tableView, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); } [iOS (6,0)] @@ -21274,4 +21262,23 @@ namespace UIKit { CGSize MaximumSize { get; set; } } + interface IUIContextMenuInteractionAnimating { } + + [NoWatch, NoTV, iOS (13,0)] + [Protocol] + interface UIContextMenuInteractionAnimating { + + [Abstract] + [NullAllowed, Export ("previewViewController")] + UIViewController PreviewViewController { get; } + + [Abstract] + [Export ("addAnimations:")] + void AddAnimations (Action animations); + + [Abstract] + [Export ("addCompletion:")] + void AddCompletion (Action completion); + } + } diff --git a/tests/xtro-sharpie/iOS-UIKit.ignore b/tests/xtro-sharpie/iOS-UIKit.ignore index 617d6915d5..448117de8f 100644 --- a/tests/xtro-sharpie/iOS-UIKit.ignore +++ b/tests/xtro-sharpie/iOS-UIKit.ignore @@ -76,6 +76,11 @@ !missing-enum! UIDirectionalRectEdge not bound !missing-selector! UIGestureRecognizer::initWithCoder: not bound !missing-selector! UIKeyCommand::action not bound +!missing-protocol-member! UICollectionViewDelegate::collectionView:willCommitMenuWithAnimator: not found +!missing-protocol-member! UIContextMenuInteractionDelegate::contextMenuInteraction:willCommitWithAnimator: not found +!missing-protocol-member! UIContextMenuInteractionDelegate::contextMenuInteractionDidEnd: not found +!missing-protocol-member! UIContextMenuInteractionDelegate::contextMenuInteractionWillPresent: not found +!missing-protocol-member! UITableViewDelegate::tableView:willCommitMenuWithAnimator: not found ## Introduced in Xcode 11 b5 but unlikely to be there at the end of beta, these usualy get replaced by NSCopying protocol !missing-selector! UIBarAppearance::copy not bound diff --git a/tests/xtro-sharpie/iOS-UIKit.todo b/tests/xtro-sharpie/iOS-UIKit.todo index 484dc71cf7..e69de29bb2 100644 --- a/tests/xtro-sharpie/iOS-UIKit.todo +++ b/tests/xtro-sharpie/iOS-UIKit.todo @@ -1,13 +0,0 @@ -## appended from unclassified file -!deprecated-attribute-missing! UIContextMenuInteractionDelegate::contextMenuInteraction:willCommitWithAnimator: missing a [Deprecated] attribute -!deprecated-attribute-missing! UIContextMenuInteractionDelegate::contextMenuInteractionDidEnd: missing a [Deprecated] attribute -!deprecated-attribute-missing! UIContextMenuInteractionDelegate::contextMenuInteractionWillPresent: missing a [Deprecated] attribute -!extra-protocol-member! unexpected selector UIContextMenuInteractionCommitAnimating::addAnimations: found -!extra-protocol-member! unexpected selector UIContextMenuInteractionCommitAnimating::addCompletion: found -!extra-protocol-member! unexpected selector UIContextMenuInteractionCommitAnimating::previewViewController found -!missing-protocol! UIContextMenuInteractionAnimating not bound -!missing-protocol-member! UICollectionViewDelegate::collectionView:willPerformPreviewActionForMenuWithConfiguration:animator: not found -!missing-protocol-member! UIContextMenuInteractionDelegate::contextMenuInteraction:willDisplayMenuForConfiguration:animator: not found -!missing-protocol-member! UIContextMenuInteractionDelegate::contextMenuInteraction:willEndForConfiguration:animator: not found -!missing-protocol-member! UIContextMenuInteractionDelegate::contextMenuInteraction:willPerformPreviewActionForMenuWithConfiguration:animator: not found -!missing-protocol-member! UITableViewDelegate::tableView:willPerformPreviewActionForMenuWithConfiguration:animator: not found