Convert UIKit keyboard animation curve to UIViewAnimationOptions#3183
Open
Kyle (Kyle-Ye) wants to merge 1 commit into
Open
Convert UIKit keyboard animation curve to UIViewAnimationOptions#3183Kyle (Kyle-Ye) wants to merge 1 commit into
Kyle (Kyle-Ye) wants to merge 1 commit into
Conversation
UIKeyboardAnimationCurveUserInfoKey stores a UIViewAnimationCurve raw value, while UIView.animateWithDuration expects UIViewAnimationOptions. Shift the curve value into the UIViewAnimationOptions curve bit field before passing it to UIKit, matching the SDK header.
Author
|
I checked the downstream usage of this value to make sure the code is not intentionally depending on the raw The
So the final call site expects |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert the UIKit keyboard animation curve from
UIKeyboardAnimationCurveUserInfoKeyto
UIViewAnimationOptionsbefore passing it toUIView.animateWithDuration.UIKeyboardAnimationCurveUserInfoKeycontains aUIViewAnimationCurveraw value,while
UIViewAnimationOptionsstores animation curve values in the curve optionbit field. Without shifting the value, non-default curves may be interpreted as
unrelated low-order animation options.
Source
SDK Header:
Apple Documentation:
https://developer.apple.com/documentation/uikit/uiresponder/keyboardanimationcurveuserinfokey
Testing
Not run; this is a small UIKit interop conversion fix and preserves the existing
fallback behavior for missing animation curve info.
Release Notes
Fixes - iOS
UIKeyboardAnimationCurveUserInfoKeyvalues toUIViewAnimationOptions.Google CLA
Sign the Google Contributor's License Agreement at https://cla.developers.google.com to let us upstream your code to Google's AOSP repository