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

Bring up the side menu from the right #2

Open
matildemarcelletti opened this issue Sep 2, 2022 · 2 comments
Open

Bring up the side menu from the right #2

matildemarcelletti opened this issue Sep 2, 2022 · 2 comments

Comments

@matildemarcelletti
Copy link

Moving the button at the top right how can I bring up the side menu from the right?

@arbindpd96
Copy link

func animateSideMenu(targetPosition: CGFloat, completion: @escaping (Bool) -> ()) { UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1.0, initialSpringVelocity: 0, options: .layoutSubviews, animations: { if self.revealSideMenuOnTop { self.sideMenuTrailingConstraint.constant = -targetPosition self.view.layoutIfNeeded() } else { self.view.subviews[1].frame.origin.x = targetPosition } }, completion: completion) }

`        if self.revealSideMenuOnTop {

// self.sideMenuTrailingConstraint = self.sideMenuViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: -self.sideMenuRevealWidth - self.paddingForRotation) //use it for left navigation mneu
self.sideMenuTrailingConstraint = self.sideMenuViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: self.sideMenuRevealWidth + self.paddingForRotation)

        self.sideMenuTrailingConstraint.isActive = true
    }`

@BilalKhanWDI
Copy link

Has anyone modified this for the pan gesture as well? the same drag as it comes from left. If anyone has mapped just update here.

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

3 participants