-
Notifications
You must be signed in to change notification settings - Fork 520
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 all 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; } | ||
|
||
|
@@ -5233,10 +5233,6 @@ interface UIDocument : NSFilePresenter, NSProgressReporting { | |
[Export ("updateUserActivityState:")] | ||
void UpdateUserActivityState (NSUserActivity userActivity); | ||
|
||
[iOS (8,0)] | ||
[Export ("restoreUserActivityState:")] | ||
void RestoreUserActivityState (NSUserActivity userActivity); | ||
|
||
[iOS (8,0)] | ||
[Field ("NSUserActivityDocumentURLKey")] | ||
NSString UserActivityDocumentUrlKey { get; } | ||
|
@@ -5703,8 +5699,8 @@ public enum UIFontTextStyle { | |
[Field ("UIFontTextStyleCallout")] | ||
Callout, | ||
|
||
[NoWatch, NoTV] | ||
[iOS (11,0)] | ||
[NoTV] | ||
[iOS (11,0), Watch (5,0)] | ||
[Field ("UIFontTextStyleLargeTitle")] | ||
LargeTitle, | ||
} | ||
|
@@ -6133,6 +6129,8 @@ interface UIGraphicsImageRendererFormat | |
[Export ("opaque")] | ||
bool Opaque { get; set; } | ||
|
||
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the 'PreferredRange' property instead.")] | ||
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use the 'PreferredRange' property instead.")] | ||
[Export ("prefersExtendedRange")] | ||
bool PrefersExtendedRange { get; set; } | ||
|
||
|
@@ -6145,6 +6143,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 +6323,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 +7993,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))] | ||
|
@@ -9712,7 +9722,7 @@ partial interface UIReferenceLibraryViewController : NSCoding { | |
} | ||
|
||
[BaseType (typeof (NSObject))] | ||
interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus | ||
interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus, UIUserActivityRestoring | ||
#if !TVOS | ||
, UIAccessibilityDragging | ||
#endif // !TVOS | ||
|
@@ -9862,10 +9872,6 @@ interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus | |
[Export ("updateUserActivityState:")] | ||
void UpdateUserActivityState (NSUserActivity activity); | ||
|
||
[iOS (8,0)] | ||
[Export ("restoreUserActivityState:")] | ||
void RestoreUserActivityState (NSUserActivity activity); | ||
|
||
[iOS (9,0)] | ||
[Export ("pressesBegan:withEvent:")] | ||
void PressesBegan (NSSet<UIPress> presses, UIPressesEvent evt); | ||
|
@@ -10024,15 +10030,12 @@ 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; } | ||
|
||
[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 +12889,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); | ||
|
@@ -12995,7 +12998,7 @@ interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynam | |
CoreAnimation.CALayer Layer { get; } | ||
|
||
[Export ("frame")] | ||
CGRect Frame { get; set; } | ||
new CGRect Frame { 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. Same: 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. Same, protocol just exposes get, not set. |
||
|
||
[Export ("center")] | ||
new CGPoint Center { get; set; } | ||
|
@@ -14320,7 +14323,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 +14358,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 +14865,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 +16690,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 +16719,19 @@ interface UIFocusItem : UIFocusEnvironment | |
[Abstract] | ||
[Export ("canBecomeFocused")] | ||
bool CanBecomeFocused { get; } | ||
|
||
// FIXME: declared as a @required, but this breaks compatibility | ||
// Radar: 41121416 | ||
[TV (12, 0), iOS (12, 0), NoWatch] | ||
#if XAMCORE_4_0 | ||
[Abstract] | ||
#endif | ||
[Export ("frame")] | ||
CGRect Frame { get; } | ||
|
||
[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 +16792,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 +16993,35 @@ interface UIFocusEnvironment { | |
[Export ("soundIdentifierForFocusUpdateInContext:")] | ||
[return: NullAllowed] | ||
NSString GetSoundIdentifier (UIFocusUpdateContext context); | ||
|
||
|
||
// FIXME: declared as a @required, but this breaks compatibility | ||
// Radar: 41121293 | ||
[TV (12, 0), iOS (12, 0)] | ||
#if XAMCORE_4_0 | ||
[Abstract] | ||
#endif | ||
[NullAllowed, Export ("parentFocusEnvironment", ArgumentSemantic.Weak)] | ||
IUIFocusEnvironment ParentFocusEnvironment { get; } | ||
|
||
[TV (12, 0), iOS (12, 0)] | ||
#if XAMCORE_4_0 | ||
[Abstract] | ||
#endif | ||
[NullAllowed, Export ("focusItemContainer")] | ||
IUIFocusItemContainer FocusItemContainer { get; } | ||
} | ||
|
||
[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 +18326,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), NoWatch] // it was added on 8,0, but was not binded and the method was added in 12,0 | ||
[Protocol] | ||
interface UIUserActivityRestoring | ||
{ | ||
[Abstract] | ||
[iOS (8,0), TV(12,0)] | ||
[Export ("restoreUserActivityState:")] | ||
void RestoreUserActivityState (NSUserActivity activity); | ||
} | ||
|
||
#endif // !WATCH | ||
|
||
[Watch (4,0), TV (11,0), iOS (11,0)] | ||
|
@@ -18276,4 +18409,5 @@ interface UIFontMetrics { | |
nfloat GetScaledValue (nfloat value, [NullAllowed] UITraitCollection traitCollection); | ||
#endif // !WATCH | ||
} | ||
|
||
} |
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.
Ah the argument here was
activity
and notuserActivity
therefore removing it and using the interface is a breaking change...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.
mmm, we have allowed parameter name changes in the past, but since the
UIUserActivityRestoring
protocol just got added lets just renameuserActivity
toactivity
to avoid the breaking change.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.
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 comment
The 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