Skip to content
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

Updated MoveAnimation to fix iOS flickering #711 #752

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jlbeard84
Copy link

Added rapid opacity change to MoveAnimation to fix flicking issue on iOS #711

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bug fix

⤵️ What is the current behavior?

iOS has a timing issue where the popup will occasionally flicker before a MoveAnimation starts X/Y translation.

🆕 What is the new behavior (if this is a feature change)?

An opacity change timed at 1ms to cover the timing issue.

💥 Does this PR introduce a breaking change?

Not that I am aware of.

🐛 Recommendations for testing

Various configurations of the MoveAnimation popup.

📝 Links to relevant issues/docs

Issue #711

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines
  • Relevant documentation was updated
  • Rebased onto current develop

Added rapid opacity change to MoveAnimation to fix flicking issue on iOS rotorgames#711
@beeradmoore
Copy link

Unfortunately this fix still doesn't work for me. Even if I move page.Opacity = 0; to the very first line in Appearing and moving taskList.Add(page.FadeTo(100, 1)); to the line after taskList.Add(content.TranslateTo(.

I tried changing the duration from 1 to DurationIn and I noticed it didn't fade in, so I thought maybe ShowPage(page); was overriding everything else so I nuked and HidePage and replaced them with page.Opacity = 0; and then for ShowPage I put in the taskList.Add(page.FadeTo(100, 1)); and it still flickered.

At this point I wasn't sure if my code was working so I did a sanity check and removed the page.FadeTo and confirmed the page never appeared (meaning the code was being executed).

To make things more annoying to debug screen recording also did not show the misplaced frame but I can still see it.

What I found that did end up working was reverting everything back to your code, but then changing the fade actions to content instead of page and that appeared to work 🤔. Should this be the intended use case rather than applying the fade to the page?

Another odd thing I found is that if I changed taskList.Add(content.FadeTo(100, 1)); to taskList.Add(content.FadeTo(100, 5000)); the popup won't fade in over the full 5 seconds. I noticed a bug in your code that this FadeTo should be to 1 not 100. taskList.Add(content.FadeTo(1, 5000)); will indeed fade in over 5 seconds.

I am curious now if these new change (and Show/HidePage) should be wrapped in an iOS check if they are not required on the other platforms.

brandonward34 added a commit to brandonward34/Rg.Plugins.Popup that referenced this pull request May 21, 2023
https://github.com/rotorgames/Rg.Plugins.Popup/pull/754/files
rotorgames#752

Also added logic to keep soft keyboard open when popup displays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants