-
Notifications
You must be signed in to change notification settings - Fork 486
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
Incorrect SupportedOSPlatform attribute on UIScrollViewKeyboardDismissMode enum #19066
Comments
This is interesting, because these two values were added in Xcode 14.0. The header from Xcode 13.3: typedef NS_ENUM(NSInteger, UIScrollViewKeyboardDismissMode) {
UIScrollViewKeyboardDismissModeNone,
UIScrollViewKeyboardDismissModeOnDrag, // dismisses the keyboard when a drag begins
UIScrollViewKeyboardDismissModeInteractive, // the keyboard follows the dragging touch off screen, and may be pulled upward again to cancel the dismiss
} API_AVAILABLE(ios(7.0)); and the header from Xcode 14: typedef NS_ENUM(NSInteger, UIScrollViewKeyboardDismissMode) {
UIScrollViewKeyboardDismissModeNone,
UIScrollViewKeyboardDismissModeOnDrag, // dismisses the keyboard when a drag begins
UIScrollViewKeyboardDismissModeInteractive, // the keyboard follows the dragging touch off screen, and may be pulled upward again to cancel the dismiss
UIScrollViewKeyboardDismissModeOnDragWithAccessory, // dismisses both keyboard and accessory in the style of UIScrollViewKeyboardDismissModeOnDrag
UIScrollViewKeyboardDismissModeInteractiveWithAccessory // dismisses both keyboard and accessory in the style of UIScrollViewKeyboardDismissModeInteractive
} API_AVAILABLE(ios(7.0)); The updated header says all the values in the enum were available since iOS 7.0 (which may or may not be a mistake), and I believe the web site is just produced from the headers (so if the headers are wrong, the website would be too). But you say this works fine in iOS 15, so this is at least somewhat backwards compatible, so I'll just fix the attributes for these two values. |
…KeyboardDismissMode. Fixes xamarin#19066. These members were introduced in Xcode 14, but seems to be backwards compatible on iOS and Mac Catalyst (according to headers, documentation, and the reporter). Fixes xamarin#19066.
I also wasn't aware of those new enums, they must be somewhat new. But they appear to be backwards-compatible |
@rolfbjarne is it possible that the same oddity applies to https://developer.apple.com/documentation/uikit/nsparagraphstyle/1534193-textlists?language=objc Lines 1797 to 1799 in 3436992
I haven't tested functionality yet, but at least setting & getting the property does not crash on iOS 15:
Also this, and probably even more: Lines 1811 to 1814 in 3436992
|
Steps to Reproduce
UIScrollViewKeyboardDismissMode.InteractiveWithAccessory
orUIScrollViewKeyboardDismissMode.OnDragWithAccessory
in a project withMinimumOSVersion
< 16.0Expected Behavior
No warning
Actual Behavior
The Apple docs describe the enum values to be available since iOS 7. I also confirmed that using the enum on a device with iOS 15 works as expected.
https://developer.apple.com/documentation/uikit/uiscrollviewkeyboarddismissmode/uiscrollviewkeyboarddismissmodeondragwithaccessory?language=objc
Environment
Version information
The text was updated successfully, but these errors were encountered: