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

Shadow disappears before closing #54

Open
Nerkyator opened this issue Aug 22, 2016 · 0 comments
Open

Shadow disappears before closing #54

Nerkyator opened this issue Aug 22, 2016 · 0 comments

Comments

@Nerkyator
Copy link

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

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

No branches or pull requests

1 participant