Skip to content
This repository has been archived by the owner on Jun 17, 2018. It is now read-only.

Disable left swipe when the first page is shown #201

Open
danielstorch opened this issue May 3, 2016 · 4 comments
Open

Disable left swipe when the first page is shown #201

danielstorch opened this issue May 3, 2016 · 4 comments

Comments

@danielstorch
Copy link

Im using SWRevealViewController for my sidebar. When normally swiping, it is possible to show the sidebar. But since im also using PagingMenuController, this is not possible anymore.

It is only possible when i globally disable the scrolling like this:
options.scrollEnabled = false

Is it possible to only disable the scrolling (only left swipe, the direction which should show the sidebar) of PagingMenuController when the first page is the currentPage?

@zcelaloglu
Copy link

same issue here!

I'm using another side menu called EnSwiftSideMenu but approach is same

@kitasuke
Copy link
Owner

I'll look into this issue with SWRevealViewController or EnSwiftSideMenu.

@danielstorch
Copy link
Author

To fix this temporarily, we have added Screen Edge Pan Gesture Recognizer to all screens via the StoryBoard and open the side menu like this:

IBAction func screenEdgeSwiped(recognizer: UIScreenEdgePanGestureRecognizer) { if recognizer.state == .Recognized { print("Screen edge swiped!") self.revealViewController().revealToggle(self) } }

But this is only a workaround since the user doesn't get this nice feeling of sliding, the side menu just pops up when recognized edge swipe.

The Youtube App does this pretty well. If you search for something, it shows an PageView with results but the user is still able to return via edge swipe. This would be the wanted behavior.

@danielstorch
Copy link
Author

Found this thread. The last example did the trick for me. It disables the FrontViewController when the menu is open and somehow makes it possible to swipe open the menu even if it is a PageView.

But the example only works for SWRevealViewController

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants