Visitar URL original
fix(ios) animation does not play if nativeView.layer is undefined by sublime392 · Pull Request #10060 · NativeScript/NativeScript · GitHub
The Wayback Machine - https://web.archive.org/web/20260625001126/https://github.com/NativeScript/NativeScript/pull/10060
Skip to content

fix(ios) animation does not play if nativeView.layer is undefined#10060

Merged
NathanWalker merged 2 commits into
NativeScript:mainfrom
sublime392:patch-1
Nov 7, 2022
Merged

fix(ios) animation does not play if nativeView.layer is undefined#10060
NathanWalker merged 2 commits into
NativeScript:mainfrom
sublime392:patch-1

Conversation

@sublime392

@sublime392 sublime392 commented Oct 17, 2022 •

Copy link
Copy Markdown
Contributor

At least in some if not all cases (noted with ui-drawer), the layer will be undefined when _createNativeAnimation is called. All of the logic in this method was contained within the if (nativeView?.layer) { }. However, the animation still needs the rest of the logic in this method, even if the layer is undefined. Moving the test for layer presence to more specific section seems to fit with how the _createNativeSpringAnimation works; not skipping everything if the layer is undefined.

PR Checklist

What is the current behavior?

Animation will not play on iOS. Noticed in the ui-drawer plugin. Seems like other animations would be affected as well.

What is the new behavior?

Animation plays (drawer opens and closes)

Fixes/Implements/Closes #[Issue Number].

At least in some if not all cases (noted with ui-drawer), the layer will be undefined when `_createNativeAnimation` is called. All of the logic in this method was contained within the `if (nativeView?.layer) { }`.  However, the animation still needs the rest of the logic in this method, even if the layer is undefined. Moving the test for layer presence to more specific section seems to fit with how the `_createNativeSpringAnimation`  works; not skipping everything if the layer is undefined.
@cla-bot

cla-bot Bot commented Oct 17, 2022

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the CLA at https://www.nativescript.org/cla.
CLA has not been signed by users: @sublime392.
After signing the CLA, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR.

@sublime392

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla: yes label Oct 17, 2022
@cla-bot

cla-bot Bot commented Oct 17, 2022

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@sublime392 sublime392 changed the title iOS animation does not play if nativeView.layer is undefined fix(ios) animation does not play if nativeView.layer is undefined Oct 17, 2022
@NathanWalker NathanWalker merged commit 6cabcab into NativeScript:main Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants