Skip to content

Commit

Permalink
[uikit] Update for Xcode 9 beta 6 - Part 4
Browse files Browse the repository at this point in the history
The following headers are now up to date:

- UICollectionViewFlowLayout.h
- UIDocumentPickerViewController.h
- UIFontDescriptor.h
- UIImage.h
- UIImageView.h
- UIImagePickerController.h
  • Loading branch information
VincentDondain committed Aug 22, 2017
1 parent 4bf1db1 commit dd38cd5
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 2 deletions.
19 changes: 19 additions & 0 deletions src/UIKit/UIEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2246,6 +2246,25 @@ public enum UITextDropPerformer : nuint
View = 0,
Delegate,
}

[NoWatch]
[iOS (11,0), TV (11,0)]
[Native]
public enum UICollectionViewFlowLayoutSectionInsetReference : nint
{
ContentInset,
SafeArea,
LayoutMargins,
}

[iOS (11,0), TV (11,0), Watch (4,0)]
[Native]
public enum UIPreferredPresentationStyle : nint
{
Unspecified = 0,
Inline,
Attachment,
}


}
14 changes: 14 additions & 0 deletions src/UIKit/UIImagePickerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ public NSUrl ReferenceUrl {
return (NSUrl) Info [UIImagePickerController.ReferenceUrl];
}
}

[iOS (11,0)]
public PHAsset PHAsset {
get {
return (PHAsset) Info [UIImagePickerController.PHAsset];
}
}

[iOS (11,0)]
public NSUrl ImageUrl {
get {
return (NSUrl) Info [UIImagePickerController.ImageUrl];
}
}
}
}

Expand Down
86 changes: 84 additions & 2 deletions src/uikit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4325,6 +4325,11 @@ interface UICollectionViewFlowLayout {
[Export ("sectionInset")]
UIEdgeInsets SectionInset { get; set; }

[NoWatch]
[iOS (11,0), TV (11,0)]
[Export ("sectionInsetReference", ArgumentSemantic.Assign)]
UICollectionViewFlowLayoutSectionInsetReference SectionInsetReference { get; set; }

[iOS (9,0)]
[Export ("sectionHeadersPinToVisibleBounds")]
bool SectionHeadersPinToVisibleBounds { get; set; }
Expand Down Expand Up @@ -5520,6 +5525,11 @@ public enum UIFontTextStyle {
[Since (9,0)]
[Field ("UIFontTextStyleCallout")]
Callout,

[NoWatch, NoTV]
[iOS (11,0)]
[Field ("UIFontTextStyleLargeTitle")]
LargeTitle,
}

[Since (7,0)]
Expand Down Expand Up @@ -6923,12 +6933,48 @@ interface UIActivityIndicatorView : NSCoding {
}
#endif // !WATCH

[NoWatch, NoTV]
[iOS (11,0)]
[Protocol]
interface UIItemProviderPresentationSizeProviding {
[Abstract]
[Export ("preferredPresentationSizeForItemProvider")]
CGSize PreferredPresentationSizeForItemProvider { get; }
}

[iOS (11,0), TV (11,0), Watch (4,0)]
[Category]
[BaseType (typeof(NSItemProvider))]
interface NSItemProvider_UIKitAdditions {
[NoWatch, NoTV]
[NullAllowed, Export ("teamData", ArgumentSemantic.Copy)]
NSData GetTeamData ();

[NoWatch, NoTV]
[NullAllowed, Export ("setTeamData", ArgumentSemantic.Copy)]
NSData SetTeamData ();

[NoWatch, NoTV]
[Export ("preferredPresentationSize", ArgumentSemantic.Assign)]
CGSize GetPreferredPresentationSize ();

[NoWatch, NoTV]
[Export ("setPreferredPresentationSize", ArgumentSemantic.Assign)]
CGSize SetPreferredPresentationSize ();

[Export ("preferredPresentationStyle", ArgumentSemantic.Assign)]
UIPreferredPresentationStyle GetPreferredPresentationStyle ();

[Export ("setPreferredPresentationStyle", ArgumentSemantic.Assign)]
UIPreferredPresentationStyle SetPreferredPresentationStyle ();
}

[BaseType (typeof (NSObject))]
interface UIImage : NSSecureCoding
#if !WATCH
, UIAccessibility, UIAccessibilityIdentification
#if !TVOS
, NSItemProviderWriting
, NSItemProviderWriting, NSItemProviderReading, UIItemProviderPresentationSizeProviding
#endif
#endif // !WATCH
{
Expand Down Expand Up @@ -7826,6 +7872,10 @@ interface UIImageView {
[TV (11, 0), NoWatch, NoiOS]
[Export ("overlayContentView", ArgumentSemantic.Strong)]
UIView OverlayContentView { get; }

[TV (11,0), NoWatch, NoiOS]
[Export ("masksFocusEffectToContents")]
bool MasksFocusEffectToContents { get; set; }
}

[NoTV]
Expand Down Expand Up @@ -8158,6 +8208,14 @@ interface UIImagePickerController {
[Static, Export ("isFlashAvailableForCameraDevice:")]
bool IsFlashAvailableForCameraDevice (UIImagePickerControllerCameraDevice cameraDevice);

[iOS (11,0)]
[Export ("imageExportPreset", ArgumentSemantic.Assign)]
UIImagePickerControllerImageUrlExportPreset ImageExportPreset { get; set; }

[iOS (11,0)]
[Export ("videoExportPreset")]
string VideoExportPreset { get; set; }

#if XAMCORE_2_0
// manually bound (const fields) in monotouch.dll - unlike the newer fields (static properties)

Expand All @@ -8177,6 +8235,7 @@ interface UIImagePickerController {
NSString MediaURL { get; }
#endif

[Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UIImagePickerController.PHAsset' instead.")]
[Field ("UIImagePickerControllerReferenceURL")]
NSString ReferenceUrl { get; }

Expand All @@ -8186,6 +8245,14 @@ interface UIImagePickerController {
[iOS (9,1)]
[Field ("UIImagePickerControllerLivePhoto")]
NSString LivePhoto { get; }

[iOS (11,0)]
[Field ("UIImagePickerControllerPHAsset")]
NSString PHAsset { get; }

[iOS (11,0)]
[Field ("UIImagePickerControllerImageURL")]
NSString ImageUrl { get; }
}

// UINavigationControllerDelegate, UIImagePickerControllerDelegate
Expand Down Expand Up @@ -16224,10 +16291,16 @@ partial interface UIDocumentPickerViewController : NSCoding {
[Export ("initWithDocumentTypes:inMode:")]
IntPtr Constructor (string [] allowedUTIs, UIDocumentPickerMode mode);

[Advice ("This method will be deprecated in a future release and should be avoided. Instead, use 'UIDocumentPickerViewController (NSUrl[], UIDocumentPickerMode)'.")]
[DesignatedInitializer]
[Export ("initWithURL:inMode:")]
IntPtr Constructor (NSUrl url, UIDocumentPickerMode mode);

[iOS (11,0)]
[Export ("initWithURLs:inMode:")]
[DesignatedInitializer]
IntPtr Constructor (NSUrl[] urls, UIDocumentPickerMode mode);

[Export ("delegate", ArgumentSemantic.Weak), NullAllowed]
NSObject WeakDelegate { get; set; }

Expand All @@ -16237,6 +16310,10 @@ partial interface UIDocumentPickerViewController : NSCoding {

[Export ("documentPickerMode", ArgumentSemantic.Assign)]
UIDocumentPickerMode DocumentPickerMode { get; }

[iOS (11,0)]
[Export ("allowsMultipleSelection")]
bool AllowsMultipleSelection { get; set; }
}

[NoWatch]
Expand All @@ -16245,10 +16322,15 @@ partial interface UIDocumentPickerViewController : NSCoding {
[Protocol, Model]
[BaseType (typeof (NSObject))]
partial interface UIDocumentPickerDelegate {
[Deprecated (PlatformName.iOS, 11, 0, message: "Implement 'DidPickDocument (UIDocumentPickerViewController, NSUrl[])' instead.")]
[Abstract]
[Export ("documentPicker:didPickDocumentAtURL:"), EventArgs ("UIDocumentPicked")]
void DidPickDocument (UIDocumentPickerViewController controller, NSUrl url);

[iOS (11,0)]
[Export ("documentPicker:didPickDocumentsAtURLs:"), EventArgs ("UIDocumentPickedAtUrls"), EventName ("DidPickDocumentAtUrls")]
void DidPickDocument (UIDocumentPickerViewController controller, NSUrl[] urls);

[Export ("documentPickerWasCancelled:")]
void WasCancelled (UIDocumentPickerViewController controller);
}
Expand Down Expand Up @@ -17868,5 +17950,5 @@ interface UIPasteConfigurationSupporting {
[Export ("canPasteItemProviders:")]
bool CanPasteItemProviders (NSItemProvider[] itemProviders);
}
#endif
#endif // !WATCH
}

0 comments on commit dd38cd5

Please sign in to comment.