-
Notifications
You must be signed in to change notification settings - Fork 511
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
[UIKit] Update for Xcode10. #4253
Changes from 3 commits
07355ad
df9d8b7
721efdc
a651156
9464027
6a08c36
462bdc3
e9fad57
b97f667
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 |
---|---|---|
|
@@ -5121,7 +5121,7 @@ interface UICollisionBehaviorDelegate { | |
// Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: do not call -[UIDocument init] - the designated initializer is -[UIDocument initWithFileURL: | ||
[DisableDefaultCtor] | ||
[ThreadSafe] | ||
interface UIDocument : NSFilePresenter, NSProgressReporting { | ||
interface UIDocument : NSFilePresenter, NSProgressReporting, UIUserActivityRestoring { | ||
[Export ("localizedName", ArgumentSemantic.Copy)] | ||
string LocalizedName { get; } | ||
|
||
|
@@ -5235,7 +5235,7 @@ interface UIDocument : NSFilePresenter, NSProgressReporting { | |
|
||
[iOS (8,0)] | ||
[Export ("restoreUserActivityState:")] | ||
void RestoreUserActivityState (NSUserActivity userActivity); | ||
new void RestoreUserActivityState (NSUserActivity userActivity); | ||
|
||
[iOS (8,0)] | ||
[Field ("NSUserActivityDocumentURLKey")] | ||
|
@@ -5703,8 +5703,8 @@ public enum UIFontTextStyle { | |
[Field ("UIFontTextStyleCallout")] | ||
Callout, | ||
|
||
[NoWatch, NoTV] | ||
[iOS (11,0)] | ||
[NoTV] | ||
[iOS (11,0), Watch (5,0)] | ||
[Field ("UIFontTextStyleLargeTitle")] | ||
LargeTitle, | ||
} | ||
|
@@ -6133,6 +6133,10 @@ interface UIGraphicsImageRendererFormat | |
[Export ("opaque")] | ||
bool Opaque { get; set; } | ||
|
||
[Introduced (PlatformName.iOS, 10, 0, message: "Use the 'PreferredRange' property instead.")] | ||
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 don't need the |
||
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the 'PreferredRange' property instead.")] | ||
[Introduced (PlatformName.TvOS, 10, 0, message: "Use the 'PreferredRange' property instead.")] | ||
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. same |
||
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use the 'PreferredRange' property instead.")] | ||
[Export ("prefersExtendedRange")] | ||
bool PrefersExtendedRange { get; set; } | ||
|
||
|
@@ -6145,6 +6149,10 @@ interface UIGraphicsImageRendererFormat | |
[Static] | ||
[Export ("formatForTraitCollection:")] | ||
UIGraphicsImageRendererFormat GetFormat (UITraitCollection traitCollection); | ||
|
||
[TV (12, 0), iOS (12, 0)] | ||
[Export ("preferredRange", ArgumentSemantic.Assign)] | ||
UIGraphicsImageRendererFormatRange PreferredRange { get; set; } | ||
} | ||
|
||
[iOS (10,0), TV (10,0)] | ||
|
@@ -6321,6 +6329,10 @@ interface UITextInputTraits { | |
[iOS (11,0), TV (11,0)] | ||
[Export ("smartInsertDeleteType", ArgumentSemantic.Assign)] | ||
UITextSmartInsertDeleteType SmartInsertDeleteType { get; set; } | ||
|
||
[iOS (12, 0)] | ||
[NullAllowed, Export ("passwordRules", ArgumentSemantic.Copy)] | ||
UITextInputPasswordRules PasswordRules { get; set; } | ||
} | ||
|
||
interface UIKeyboardEventArgs { | ||
|
@@ -7987,6 +7999,10 @@ interface UILabel : UIContentSizeCategoryAdjusting { | |
[iOS (9,0)] | ||
[Export ("allowsDefaultTighteningForTruncation")] | ||
bool AllowsDefaultTighteningForTruncation { get; set; } | ||
|
||
[TV (12, 0), NoWatch, NoiOS] | ||
[Export ("enablesMarqueeWhenAncestorFocused")] | ||
bool EnablesMarqueeWhenAncestorFocused { get; set; } | ||
} | ||
|
||
[BaseType (typeof (UIView))] | ||
|
@@ -8449,7 +8465,7 @@ interface UIImagePickerControllerDelegate { | |
[BaseType (typeof (UIDocument))] | ||
// *** Assertion failure in -[UIManagedDocument init], /SourceCache/UIKit_Sim/UIKit-1914.84/UIDocument.m:258 | ||
[DisableDefaultCtor] | ||
interface UIManagedDocument { | ||
interface UIManagedDocument : UIManagedDocument { | ||
// note: ctor are not inherited, but this is how the documentation tells you to create an UIManagedDocument | ||
// https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIManagedDocument_Class/Reference/Reference.html | ||
[Export ("initWithFileURL:")] | ||
|
@@ -9712,7 +9728,7 @@ partial interface UIReferenceLibraryViewController : NSCoding { | |
} | ||
|
||
[BaseType (typeof (NSObject))] | ||
interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus | ||
interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus, UIUserActivityRestoring | ||
#if !TVOS | ||
, UIAccessibilityDragging | ||
#endif // !TVOS | ||
|
@@ -9864,7 +9880,7 @@ interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus | |
|
||
[iOS (8,0)] | ||
[Export ("restoreUserActivityState:")] | ||
void RestoreUserActivityState (NSUserActivity activity); | ||
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. Ah the argument here was 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. mmm, we have allowed parameter name changes in the past, but since the 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. Sure, also, braking change is probably a too "strong" adjective. API will change, not break ;) Doing it nevertheless 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. It is a breaking change because of named parameters for example if anyone is doing RestoreUserActivityState (activity: x); it would not compile anymore, but yeah not very likely |
||
new void RestoreUserActivityState (NSUserActivity activity); | ||
|
||
[iOS (9,0)] | ||
[Export ("pressesBegan:withEvent:")] | ||
|
@@ -10024,15 +10040,15 @@ UIScreenMode CurrentMode { | |
} | ||
|
||
[BaseType (typeof (UIView), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UIScrollViewDelegate)})] | ||
interface UIScrollView { | ||
interface UIScrollView : UIFocusItemScrollableContainer { | ||
[Export ("initWithFrame:")] | ||
IntPtr Constructor (CGRect frame); | ||
|
||
[Export ("contentOffset")] | ||
CGPoint ContentOffset { get; set; } | ||
new CGPoint ContentOffset { get; set; } | ||
|
||
[Export ("contentSize")] | ||
CGSize ContentSize { get; set; } | ||
new CGSize ContentSize { get; set; } | ||
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. Can this be removed as well, so that we get it from 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. No, in this case the protocol just exposes the get, but not the set. |
||
|
||
[Export ("contentInset")] | ||
UIEdgeInsets ContentInset { get; set; } | ||
|
@@ -12886,7 +12902,7 @@ interface UIVideoEditorControllerDelegate { | |
} | ||
|
||
[BaseType (typeof (UIResponder))] | ||
interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynamicItem, NSCoding, UIAccessibilityIdentification, UITraitEnvironment, UICoordinateSpace, UIFocusItem, CALayerDelegate { | ||
interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynamicItem, NSCoding, UIAccessibilityIdentification, UITraitEnvironment, UICoordinateSpace, UIFocusItem, CALayerDelegate, UIFocusItemContainer { | ||
[DesignatedInitializer] | ||
[Export ("initWithFrame:")] | ||
IntPtr Constructor (CGRect frame); | ||
|
@@ -14320,7 +14336,7 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { | |
[Export ("userInterfaceIdiom")] | ||
UIUserInterfaceIdiom UserInterfaceIdiom { get; } | ||
|
||
[TV (10, 0), NoWatch, NoiOS] | ||
[TV (10, 0), NoWatch, iOS (12,0)] | ||
[Export ("userInterfaceStyle")] | ||
UIUserInterfaceStyle UserInterfaceStyle { get; } | ||
|
||
|
@@ -14355,7 +14371,7 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { | |
[Static, Export ("traitCollectionWithForceTouchCapability:")] | ||
UITraitCollection FromForceTouchCapability (UIForceTouchCapability capability); | ||
|
||
[TV (10, 0), NoWatch, NoiOS] | ||
[TV (10, 0), NoWatch, iOS (12,0)] | ||
[Static] | ||
[Export ("traitCollectionWithUserInterfaceStyle:")] | ||
UITraitCollection FromUserInterfaceStyle (UIUserInterfaceStyle userInterfaceStyle); | ||
|
@@ -14862,6 +14878,14 @@ interface UITextContentType { | |
[iOS (11,0), TV (11,0)] | ||
[Field ("UITextContentTypePassword")] | ||
NSString Password { get; } | ||
|
||
[TV (12, 0), iOS (12, 0)] | ||
[Field ("UITextContentTypeNewPassword")] | ||
NSString NewPassword { get; } | ||
|
||
[TV (12, 0), iOS (12, 0)] | ||
[Field ("UITextContentTypeOneTimeCode")] | ||
NSString OneTimeCode { get; } | ||
} | ||
|
||
[BaseType (typeof (UIViewController), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UISplitViewControllerDelegate)})] | ||
|
@@ -16679,6 +16703,27 @@ interface UIFocusGuide { | |
IUIFocusEnvironment[] PreferredFocusEnvironments { get; set; } | ||
} | ||
|
||
[TV (12,0), iOS (12,0)] | ||
[BaseType (typeof(NSObject))] | ||
[DisableDefaultCtor] | ||
interface UIFocusMovementHint : NSCopying | ||
{ | ||
[Export ("movementDirection")] | ||
CGVector MovementDirection { get; } | ||
|
||
[Export ("perspectiveTransform")] | ||
CATransform3D PerspectiveTransform { get; } | ||
|
||
[Export ("rotation")] | ||
CGVector Rotation { get; } | ||
|
||
[Export ("translation")] | ||
CGVector Translation { get; } | ||
|
||
[Export ("interactionTransform")] | ||
CATransform3D InteractionTransform { get; } | ||
} | ||
|
||
interface IUIFocusItem {} | ||
[iOS (10,0)] | ||
[Protocol] | ||
|
@@ -16687,6 +16732,19 @@ interface UIFocusItem : UIFocusEnvironment | |
[Abstract] | ||
[Export ("canBecomeFocused")] | ||
bool CanBecomeFocused { get; } | ||
|
||
// FIXME: declared as a @required, but this breaks compatibilit | ||
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. Minor typo: "compatibility" |
||
// Radar: 41121416 | ||
#if XAMCORE_4_0 | ||
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. Only the #if XAMCORE_4_0
[Abstract]
#endif
[TV (12, 0), iOS (12, 0), NoWatch]
[Export ("frame")]
CGRect Frame { get; } |
||
[TV (12, 0), iOS (12, 0), NoWatch] | ||
[Abstract] | ||
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 a breaking change: can't add new It should go into a |
||
[Export ("frame")] | ||
CGRect Frame { get; } | ||
#endif | ||
|
||
[TV (12, 0), iOS (12, 0), NoWatch] | ||
[Export ("didHintFocusMovement:")] | ||
void DidHintFocusMovement (UIFocusMovementHint hint); | ||
} | ||
|
||
[DisableDefaultCtor] // [Assert] -init is not a useful initializer for this class. Use one of the designated initializers instead | ||
|
@@ -16747,6 +16805,24 @@ interface UIFocusSystem { | |
// The 2 values associated with the 'UIFocusSoundIdentifier' smart enum cannot be used. | ||
// See https://developer.apple.com/documentation/uikit/uifocussystem/2887479-register | ||
// Do not specify one of the UIKit sound identifiers (such as default); doing so will cause an immediate assertion failure and crash your app. | ||
|
||
[TV (12, 0), iOS (12, 0)] | ||
[NullAllowed, Export ("focusedItem", ArgumentSemantic.Weak)] | ||
IUIFocusItem FocusedItem { get; } | ||
|
||
[TV (12,0), iOS (12,0)] | ||
[Static] | ||
[Export ("focusSystemForEnvironment:")] | ||
[return: NullAllowed] | ||
UIFocusSystem Create (IUIFocusEnvironment environment); | ||
|
||
[TV (12,0), iOS (12,0)] | ||
[Export ("requestFocusUpdateToEnvironment:")] | ||
void RequestFocusUpdate (IUIFocusEnvironment environment); | ||
|
||
[TV (12,0), iOS (12,0)] | ||
[Export ("updateFocusIfNeeded")] | ||
void UpdateFocusIfNeeded (); | ||
} | ||
|
||
interface IUIFocusDebuggerOutput {} | ||
|
@@ -16930,7 +17006,33 @@ interface UIFocusEnvironment { | |
[Export ("soundIdentifierForFocusUpdateInContext:")] | ||
[return: NullAllowed] | ||
NSString GetSoundIdentifier (UIFocusUpdateContext context); | ||
|
||
|
||
// FIXME: declared as a @required, but this breaks compatibility | ||
// Radar: 41121293 | ||
#if XAMCORE_4_0 | ||
[TV (12, 0), iOS (12, 0)] | ||
[Abstract] | ||
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. Breaking change. 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. So XAMCORE_4_0 then |
||
[NullAllowed, Export ("parentFocusEnvironment", ArgumentSemantic.Weak)] | ||
IUIFocusEnvironment ParentFocusEnvironment { get; } | ||
|
||
[TV (12, 0), iOS (12, 0)] | ||
[Abstract] | ||
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. Breaking change. |
||
[NullAllowed, Export ("focusItemContainer")] | ||
IUIFocusItemContainer FocusItemContainer { get; } | ||
#endif | ||
} | ||
|
||
[TV (12,0), iOS (12,0)] | ||
[BaseType (typeof(NSObject))] | ||
[DisableDefaultCtor] | ||
interface UITextInputPasswordRules : NSSecureCoding, NSCopying | ||
{ | ||
[Export ("passwordRulesDescriptor")] | ||
string PasswordRulesDescriptor { get; } | ||
|
||
[Static] | ||
[Export ("passwordRulesWithDescriptor:")] | ||
UITextInputPasswordRules Create (string passwordRulesDescriptor); | ||
} | ||
#endif // !WATCH | ||
|
||
|
@@ -18235,6 +18337,48 @@ interface UIDocumentBrowserAction { | |
[Export ("supportsMultipleItems")] | ||
bool SupportsMultipleItems { get; set; } | ||
} | ||
|
||
interface IUIFocusItemContainer {} | ||
[iOS (12,0), TV (12,0), NoWatch] | ||
[Protocol] | ||
interface UIFocusItemContainer | ||
{ | ||
[Abstract] | ||
[Export ("coordinateSpace")] | ||
IUICoordinateSpace CoordinateSpace { get; } | ||
|
||
[Abstract] | ||
[Export ("focusItemsInRect:")] | ||
IUIFocusItem[] GetFocusItems (CGRect rect); | ||
} | ||
|
||
[iOS (12,0), TV(12,0), NoWatch] | ||
[Protocol] | ||
interface UIFocusItemScrollableContainer : UIFocusItemContainer | ||
{ | ||
[Abstract] | ||
[Export ("contentOffset", ArgumentSemantic.Assign)] | ||
CGPoint ContentOffset { get; set; } | ||
|
||
[Abstract] | ||
[Export ("contentSize")] | ||
CGSize ContentSize { get; } | ||
|
||
[Abstract] | ||
[Export ("visibleSize")] | ||
CGSize VisibleSize { get; } | ||
} | ||
|
||
[iOS (8,0), TV (8,0), NoWatch] // it was added on 8,0, but was not binded and the method was added in 12,0 | ||
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. tvOS started with 9.0 so remove it's attribute (which means it's always been available) |
||
[Protocol] | ||
interface UIUserActivityRestoring | ||
{ | ||
[Abstract] | ||
[iOS (8,0), TV(12,0)] | ||
[Export ("restoreUserActivityState:")] | ||
void RestoreUserActivityState (NSUserActivity userActivity); | ||
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. Rename |
||
} | ||
|
||
#endif // !WATCH | ||
|
||
[Watch (4,0), TV (11,0), iOS (11,0)] | ||
|
@@ -18276,4 +18420,16 @@ interface UIFontMetrics { | |
nfloat GetScaledValue (nfloat value, [NullAllowed] UITraitCollection traitCollection); | ||
#endif // !WATCH | ||
} | ||
|
||
[Static] | ||
[iOS (12,0), TV (12,0), Watch (5,0)] | ||
interface UIKitVersion { | ||
|
||
[Field ("UIKitVersionNumber")] | ||
double UIKitVersionNumber { get; } | ||
|
||
[Field ("UIKitVersionString")] | ||
NSString UIKitVersionString { get; } | ||
|
||
} | ||
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. remove those and put them in |
||
} |
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.
Can you try locally to remove this method, so that we get the one from the protocol, and see what happens to the api diff? I think it won't be a breaking change, in which case it's better to remove it.