New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ios11-beta1] Initial UIKit Drag and Drop support #2190
Changes from 1 commit
30d911a
94f7013
4849fa7
3c56df8
14d9105
fcb81d9
8a44db7
0643d17
6c87a94
897f203
631e676
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8780,6 +8780,22 @@ partial interface NSItemProvider : NSCopying { | |
#endif | ||
} | ||
|
||
interface INSItemProviderReading {} | ||
|
||
[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] | ||
[Protocol, Model] | ||
[BaseType (typeof(NSObject))] | ||
interface NSItemProviderReading | ||
{ | ||
[Static, Abstract] | ||
[Export ("readableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] | ||
string[] ReadableTypeIdentifiersForItemProvider { get; } | ||
|
||
[Abstract] | ||
[Export ("initWithItemProviderData:typeIdentifier:error:")] | ||
NSObject CreateFrom (NSData providerData, string typeIdentifier, [NullAllowed] out NSError outError); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an Objective-C constructor, so I don't think binding it as an instance method will work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right, what should we do in this case? On the one hand, we should flag the classes that implement this, and manually add the constructor there (NSAttributedString, UIColor, UIImage). The other part is more complicated, given a class that implements this interface, probably our best bet is to have a factory method as an extension class that does the work:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed a bug for this: https://bugzilla.xamarin.com/show_bug.cgi?id=57650 |
||
} | ||
|
||
#if XAMCORE_2_0 | ||
[Static] | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this protocol is supposed to be implemented by existing types that can be dragged/dropped, in which case
[Model]
doesn't make sense, it can be only[Protocol]
.