Baseflow / Baseflow/Xamarin-Sidebar

Shadow disappears before closing

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
112
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Hi!
I've noticed that side shadow disappears before closing menu animation ends.
It happens on both sides.

I've fixed it with this implementation of `CloseMenu` in _Sidebar.cs_

```

public void CloseMenu(bool animate = true)
{
if (!IsOpen || Disabled)
return;
MenuViewController.View.EndEditing(true);

UIView.AnimateNotify(animate ? Sidebar.SlideSpeed : 0,
0,
UIViewAnimationOptions.CurveEaseInOut,
() =>
{
_sidebarContentArea.CloseAnimation();
_sidebarContentArea.AfterCloseAnimation(TapGesture);
IsOpen = false;
},
(finished) =>
{
if (finished)
HideShadow();
});
}
```

Basically same as original but used `AnimateNotify` wrapper to have completion handler

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.