-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Convert ShellContent transitions to use animators and be smarter about selecting visible content #13046
Conversation
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.
Works as expected on my end.
|
||
currentRenderer.NativeView.Frame = new CGRect(-motionDirection * View.Bounds.Width, 0, View.Bounds.Width, View.Bounds.Height); | ||
UIViewPropertyAnimator CreateContentAnimator( |
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.
@GiampaoloGabba I'm thinking after this PR is merged we can make this or something close to this virtual for some added animation customizations!!
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.
nice! i need to explore the other platforms renderers for the equivalent animation.
For now i jsut played with the NavigationPage (and shell equivalent) animatins, i skipped tabbed because we dont have animations in the TabbedPage for iOS.
For MAUI i will focus more on shell: is more flexibile. As today i dont use much shell because is not well integrated with libraries like PRISM, but from my understating this will change for MAUI, so maybe i will go "full-in" with shell animations
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.
…t selecting visible content (xamarin#13046) fixes xamarin#12642 * Convert to Property Animators * - uitests * Update ShellSectionRootRenderer.cs * - fix nre
Description of Change
On iOS when transitioning really quickly the animations would start to overlap which would cause all the UIViews to become removed once the animations resolved. I converted over to using a UIViewPropertyAnimator so that I can cancel the animation if the user clicks quickly enough that it has resolved.
Once the animation concludes the code now just figures out who should be visible instead of using messy closures from whoever started the animation.
Issues Resolved
Platforms Affected
Testing Procedure
PR Checklist